class_docstr: Creates a human-readable report, a Metaflow Card, after this step completes.
  
  Note that you may add multiple `@card` decorators in a step with different parameters.
  
  Parameters
  ----------
  type : str, default: 'default'
      Card type.
  id : str, optional, default: None
      If multiple cards are present, use this id to identify this card.
  options : Dict[str, Any], default: {}
      Options passed to the card. The contents depend on the card type.
  timeout : int, default: 45
      Interrupt reporting if it takes more than this many seconds.
class_docstr_tok: ["Creates","a","human-readable","report",",","a","Metaflow","Card",",","after","this","step","completes",".","Note","that","you","may","add","multiple","`","@","card","`","decorators","in","a","step","with","different","parameters",".","Parameters","--","--","--","--","--","type",":","str",",","default",":","'default'","Card","type",".","id",":","str",",","optional",",","default",":","None","If","multiple","cards","are","present",",","use","this","id","to","identify","this","card",".","options",":","Dict","[","str",",","Any","]",",","default",":","{","}","Options","passed","to","the","card",".","The","contents","depend","on","the","card","type",".","timeout",":","int",",","default",":","45","Interrupt","reporting","if","it","takes","more","than","this","many","seconds","."]
code: def step_init(
      self,
      flow,
      graph,
      step_name,
      decorators,
      environment,
      flow_datastore,
      logger,
  ):
      self._flow_datastore = flow_datastore
      self._environment = environment
      self._logger = logger
      self.card_options = None
  
      self.card_options = self.attributes["options"]
  
      evt_name = "step-init"
      # `'%s-%s'%(evt_name,step_name)` ensures that we capture this once per @card per @step.
      # Since there can be many steps checking if event is registered for `evt_name` will only make it check it once for all steps.
      # Hence, we have `_is_event_registered('%s-%s'%(evt_name,step_name))`
      evt = "%s-%s" % (evt_name, step_name)
      if not self._is_event_registered(evt):
          # We set the total count of decorators so that we can use it for
          # when calling the finalize function of CardComponentCollector
          # We set the total @card per step via calling `_set_card_counts_per_step`.
          other_card_decorators = [
              deco
              for deco in decorators
              if isinstance(deco, self.__class__)
          ]
          self._set_card_counts_per_step(
              step_name, len(other_card_decorators)
          )
          self._register_event(evt)
  
imports: from metaflow.decorators import StepDecorator
  from metaflow.current import current
  from metaflow.util import to_unicode
  from .component_serializer import CardComponentCollector, get_card_class
  from .card_creator import CardCreator
  import re
  from .exception import CARD_ID_PATTERN, TYPE_CHECK_REGEX
label_desc: Use image node_id 7 for calling the CardDecorator obj's underlying member method code with example usage: obj.step_init(flow, graph, step_name, decorators, environment, flow_datastore, logger) without return types