code: def list_cards(self, step, task, card_type=None):
      from metaflow.plugins.cards.exception import (
          CardNotPresentException,
      )
  
      no_card_found_message = CardNotPresentException.headline
      try:
          card_data = self._list_cards(
              step, task=task, card_type=card_type
          )
      except subprocess.CalledProcessError as e:
          if no_card_found_message in e.stderr.decode("utf-8").strip():
              card_data = None
          else:
              raise e
      return card_data
  
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 7 for calling the CliCheck obj's underlying member method code with example usage: obj.list_cards(step, task, card_type) and returns: card_data