class_docstr: `CardContainer` is an immutable list-like object, returned by `get_cards`,
  which contains individual `Card`s.
  
  Notably, `CardContainer` contains a special
  `_repr_html_` function which renders cards automatically in an output
  cell of a notebook.
  
  The following operations are supported:
  ```
  cards = get_cards(MyTask)
  
  # retrieve by index
  first_card = cards[0]
  
  # check length
  if len(cards) > 1:
      print('many cards present!')
  
  # iteration
  list_of_cards = list(cards)
  ```
class_docstr_tok: ["`","CardContainer","`","is","an","immutable","list-like","object",",","returned","by","`","get_cards","`",",","which","contains","individual","`","Card","`","s",".","Notably",",","`","CardContainer","`","contains","a","special","`","_repr_html_","`","function","which","renders","cards","automatically","in","an","output","cell","of","a","notebook",".","The","following","operations","are","supported",":","``","`","cards","=","get_cards","(","MyTask",")","#","retrieve","by","index","first_card","=","cards","[","0","]","#","check","length","if","len","(","cards",")",">","1",":","print","(","'many","cards","present","!","'",")","#","iteration","list_of_cards","=","list","(","cards",")","``","`"]
code: def _repr_html_(self):
      main_html = []
      for idx, _ in enumerate(self._card_paths):
          card = self._get_card(idx)
          main_html.append(self._make_heading(card.type))
          container_id = uuid.uuid4()
          main_html.append(
              "<script type='text/javascript'>var mfContainerId = '%s';</script>"
              % container_id
          )
          main_html.append(
              "<div class='embed' data-container='%s'>%s</div>"
              % (container_id, card.get())
          )
      return "\n".join(main_html)
  
imports: from typing import Optional, Union, TYPE_CHECKING
  from metaflow.datastore import FlowDataStore
  from metaflow.metaflow_config import CARD_SUFFIX
  from .card_resolver import resolve_paths_from_task, resumed_info
  from .card_datastore import CardDatastore, CardNameSuffix
  from .exception import UnresolvableDatastoreException, IncorrectArgumentException, IncorrectPathspecException
  import os
  import tempfile
  import uuid
label_desc: Use image node_id 7 for calling the CardContainer obj's underlying member method code with example usage: obj._repr_html_() and returns: str