class_docstr: This class helps collect `MetaflowCardComponent`s during runtime execution
  
  ### Usage with `current`
  `current.card` is of type `CardComponentCollector`
  
  ### Main Usage TLDR
  - [x] `current.card.append` customizes the default editable card.
  - [x] Only one card can be default editable in a step.
  - [x] The card class must have `ALLOW_USER_COMPONENTS=True` to be considered default editable.
      - [x] Classes with `ALLOW_USER_COMPONENTS=False` are never default editable.
  - [x] The user can specify an `id` argument to a card, in which case the card is editable through `current.card[id].append`.
      - [x] A card with an id can be also default editable, if there are no other cards that are eligible to be default editable.
  - [x] If multiple default-editable cards exist but only one card doesn't have an id, the card without an id is considered to be default editable.
  - [x] If we can't resolve a single default editable card through the above rules, `current.card`.append calls show a warning but the call doesn't fail.
  - [x] A card that is not default editable can be still edited through:
      - [x] its `current.card['myid']`
      - [x] by looking it up by its type, e.g. `current.card.get(type='pytorch')`.
class_docstr_tok: ["This","class","helps","collect","`","MetaflowCardComponent","`","s","during","runtime","execution","#","#","#","Usage","with","`","current","`","`","current.card","`","is","of","type","`","CardComponentCollector","`","#","#","#","Main","Usage","TLDR","-","[","x","]","`","current.card.append","`","customizes","the","default","editable","card",".","-","[","x","]","Only","one","card","can","be","default","editable","in","a","step",".","-","[","x","]","The","card","class","must","have","`","ALLOW_USER_COMPONENTS=True","`","to","be","considered","default","editable",".","-","[","x","]","Classes","with","`","ALLOW_USER_COMPONENTS=False","`","are","never","default","editable",".","-","[","x","]","The","user","can","specify","an","`","id","`","argument","to","a","card",",","in","which","case","the","card","is","editable","through","`","current.card","[","id","]",".append","`",".","-","[","x","]","A","card","with","an","id","can","be","also","default","editable",",","if","there","are","no","other","cards","that","are","eligible","to","be","default","editable",".","-","[","x","]","If","multiple","default-editable","cards","exist","but","only","one","card","does","n't","have","an","id",",","the","card","without","an","id","is","considered","to","be","default","editable",".","-","[","x","]","If","we","ca","n't","resolve","a","single","default","editable","card","through","the","above","rules",",","`","current.card","`",".append","calls","show","a","warning","but","the","call","does","n't","fail",".","-","[","x","]","A","card","that","is","not","default","editable","can","be","still","edited","through",":","-","[","x","]","its","`","current.card","[","'myid","'","]","`","-","[","x","]","by","looking","it","up","by","its","type",",","e.g",".","`","current.card.get","(","type='pytorch","'",")","`","."]
docstr: Appends a component to the current card.
  
  Parameters
  ----------
  component : MetaflowCardComponent
      Card component to add to this card.
docstr_tok: ["Appends","a","component","to","the","current","card",".","Parameters","--","--","--","--","--","component",":","MetaflowCardComponent","Card","component","to","add","to","this","card","."]
code: def append(self, component, id=None):
      """
      Appends a component to the current card.
  
      Parameters
      ----------
      component : MetaflowCardComponent
          Card component to add to this card.
      """
      if self._default_editable_card is None:
          if (
              len(self._card_component_store) == 1
          ):  # if there is one card which is not the _default_editable_card then the card is not editable
              card_type = list(self._cards_meta.values())[0]["type"]
              if list(self._cards_meta.values())[0]["exists"]:
                  _crdwr = (
                      "Card of type `%s` is not an editable card."
                      % card_type
                  )
                  _endwr = "Please use an editable card."  # todo : link to documentation
              else:
                  _crdwr = (
                      "Card of type `%s` doesn't exist." % card_type
                  )
                  _endwr = "Please use a card `type` which exits."  # todo : link to documentation
  
              _warning_msg = [
                  _crdwr,
                  "Component will not be appended and `current.card.append` will not work for any call during this runtime execution.",
                  _endwr,
              ]
          else:
              _warning_msg = [
                  "`current.card.append` cannot disambiguate between multiple editable cards.",
                  "Component will not be appended and `current.card.append` will not work for any call during this runtime execution.",
                  "To fix this set the `id` argument in all @card's when using multiple @card decorators over a single @step. ",  # todo : Add Link to documentation
              ]
  
          if not self._warned_once["append"]:
              self._warning(" ".join(_warning_msg))
              self._add_warning_to_cards("\n".join(_warning_msg))
              self._warned_once["append"] = True
  
          return
      self._card_component_store[self._default_editable_card].append(
          component, id=id
      )
  
imports: from .card_modules import MetaflowCardComponent
  from .card_modules.basic import ErrorComponent, SectionComponent
  from .card_modules.components import UserComponent, create_component_id, StubComponent
  from .exception import ComponentOverwriteNotSupportedException
  from metaflow.metaflow_config import RUNTIME_CARD_RENDER_INTERVAL
  import uuid
  import json
  import platform
  from collections import OrderedDict
  import time
label_desc: Use image node_id 11 for calling the CardComponentCollector obj's underlying member method code with example usage: obj.append(component, id) without return types