code: def assert_card(
      self,
      step,
      task,
      card_type,
      value,
      card_hash=None,
      card_id=None,
      exact_match=True,
  ):
      from metaflow.plugins.cards.exception import (
          CardNotPresentException,
      )
  
      no_card_found_message = CardNotPresentException.headline
      try:
          card_data = self.get_card(
              step,
              task,
              card_type,
              card_hash=card_hash,
              card_id=card_id,
          )
      except subprocess.CalledProcessError as e:
          if no_card_found_message in e.stderr.decode("utf-8").strip():
              card_data = None
          else:
              raise e
      if (exact_match and card_data != value) or (
          not exact_match and value not in card_data
      ):
          raise AssertCardFailed(
              "Task '%s/%s' expected %s card with content '%s' but got '%s'"
              % (
                  self.run_id,
                  step,
                  card_type,
                  repr(value),
                  repr(card_data),
              )
          )
      return True
  
imports: import sys
  import subprocess
  import json
  from collections import namedtuple
  from tempfile import NamedTemporaryFile
  from metaflow.includefile import IncludedFile
  from metaflow.util import is_stringish
  from .None import MetaflowCheck, AssertArtifactFailed, AssertLogFailed, truncate, AssertCardFailed
label_desc: Use image node_id 6 for calling the CliCheck obj's underlying member method code with example usage: obj.assert_card(step, task, card_type, value, card_hash, card_id, exact_match) and returns: True