code: def run(self):
      # gives you access to the options of the directive
      options = self.options
  
      cid = nodes.make_id("card-{}".format(options["title"]))
  
      classes = ["mx-card"]
      if options.get("is_head", "False").lower() == "true":
          classes.append("head-card")
      container = nodes.container(ids=[cid], classes=classes)
  
      container += nodes.inline(
          "", options["title"], classes=["mx-card-title"]
      )
      link = options.get("link")
      if link:
          container += nodes.inline("", link, classes=["mx-card-link"])
  
      para = nodes.paragraph(classes=["mx-card-text"])
      self.state.nested_parse(self.content, self.content_offset, para)
      container += para
  
      # we return the result
      return [container]
  
file_path: mxnet/docs/python_docs/themes/mx-theme/mxtheme/card.py
imports: from sphinx.locale import _
  from docutils import nodes
  from docutils.parsers.rst import Directive, directives
label_desc: Use image node_id 1 for calling the CardDirective obj's underlying member method code with example usage: obj.run() and returns: list