class_docstr: - Requires on tests/extensions/packages to be installed.
class_docstr_tok: ["-","Requires","on","tests\/extensions\/packages","to","be","installed","."]
code: def check_results(self, flow, checker):
      run = checker.get_run()
      if run is None:
          # This means CliCheck is in context.
          for step in flow:
              if step.name != "start":
                  continue
              cli_check_dict = checker.artifact_dict(step.name, "task")
              for task_pathspec in cli_check_dict:
                  full_pathspec = "/".join([flow.name, task_pathspec])
                  task_id = task_pathspec.split("/")[-1]
                  cards_info = checker.list_cards(step.name, task_id)
                  # Just check if the cards are created.
                  assert_equals(
                      cards_info is not None
                      and "cards" in cards_info
                      and len(cards_info["cards"]) == 4,
                      True,
                  )
      else:
          # This means MetadataCheck is in context.
          for step in flow:
              if step.name != "start":
                  continue
              meta_check_dict = checker.artifact_dict(step.name, "task")
              for task_id in meta_check_dict:
                  full_pathspec = meta_check_dict[task_id]["task"]
                  cards_info = checker.list_cards(step.name, task_id)
                  assert_equals(
                      cards_info is not None
                      and "cards" in cards_info
                      and len(cards_info["cards"]) == 4,
                      True,
                  )
  
imports: from metaflow_test import MetaflowTest, ExpectationFailed, steps, tag
label_desc: Use image node_id 3 for calling the CardExtensionsImportTest obj's underlying member method code with example usage: obj.check_results(flow, checker) without return types