original_docstring: Builds output context from provided parameters.
  
      ``build_output_context`` can be used as either a function, or a context manager. If resources
      that are also context managers are provided, then ``build_output_context`` must be used as a
      context manager.
  
      Args:
          step_key (Optional[str]): The step_key for the compute step that produced the output.
          name (Optional[str]): The name of the output that produced the output.
          metadata (Optional[Dict[str, Any]]): A dict of the metadata that is assigned to the
              OutputDefinition that produced the output.
          mapping_key (Optional[str]): The key that identifies a unique mapped output. None for regular outputs.
          config (Optional[Any]): The configuration for the output.
          dagster_type (Optional[DagsterType]): The type of this output.
          version (Optional[str]): (Experimental) The version of the output.
          resource_config (Optional[Dict[str, Any]]): The resource config to make available from the
              input context. This usually corresponds to the config provided to the resource that
              loads the output manager.
          resources (Optional[Resources]): The resources to make available from the context.
              For a given key, you can provide either an actual instance of an object, or a resource
              definition.
          solid_def (Optional[SolidDefinition]): The definition of the solid that produced the output.
          op_def (Optional[OpDefinition]): The definition of the solid that produced the output.
  
      Examples:
  
          .. code-block:: python
  
              build_output_context()
  
              with build_output_context(resources={"foo": context_manager_resource}) as context:
                  do_something
  
      
docstring: Builds output context from provided parameters.
  ``build_output_context`` can be used as either a function, or a context manager. If resources
  that are also context managers are provided, then ``build_output_context`` must be used as a
  context manager.
docstring_tokens: Builds output context from provided parameters . ` ` build_output_context ` ` can be used as either a function or a context manager . If resources that are also context managers are provided then ` ` build_output_context ` ` must be used as a context manager .
code: def build_output_context(
      step_key: Optional[str] = None,
      name: Optional[str] = None,
      metadata: Optional[Dict[str, Any]] = None,
      run_id: Optional[str] = None,
      mapping_key: Optional[str] = None,
      config: Optional[Any] = None,
      dagster_type: Optional["DagsterType"] = None,
      version: Optional[str] = None,
      resource_config: Optional[Dict[str, Any]] = None,
      resources: Optional[Dict[str, Any]] = None,
      solid_def: Optional[SolidDefinition] = None,
      op_def: Optional[OpDefinition] = None,
  ) -> "OutputContext":
      """Builds output context from provided parameters.
  
      ``build_output_context`` can be used as either a function, or a context manager. If resources
      that are also context managers are provided, then ``build_output_context`` must be used as a
      context manager.
  
      Args:
          step_key (Optional[str]): The step_key for the compute step that produced the output.
          name (Optional[str]): The name of the output that produced the output.
          metadata (Optional[Dict[str, Any]]): A dict of the metadata that is assigned to the
              OutputDefinition that produced the output.
          mapping_key (Optional[str]): The key that identifies a unique mapped output. None for regular outputs.
          config (Optional[Any]): The configuration for the output.
          dagster_type (Optional[DagsterType]): The type of this output.
          version (Optional[str]): (Experimental) The version of the output.
          resource_config (Optional[Dict[str, Any]]): The resource config to make available from the
              input context. This usually corresponds to the config provided to the resource that
              loads the output manager.
          resources (Optional[Resources]): The resources to make available from the context.
              For a given key, you can provide either an actual instance of an object, or a resource
              definition.
          solid_def (Optional[SolidDefinition]): The definition of the solid that produced the output.
          op_def (Optional[OpDefinition]): The definition of the solid that produced the output.
  
      Examples:
  
          .. code-block:: python
  
              build_output_context()
  
              with build_output_context(resources={"foo": context_manager_resource}) as context:
                  do_something
  
      """
      from dagster.core.types.dagster_type import DagsterType
      from dagster.core.execution.context_creation_pipeline import initialize_console_manager
  
      step_key = check.opt_str_param(step_key, "step_key")
      name = check.opt_str_param(name, "name")
      metadata = check.opt_dict_param(metadata, "metadata", key_type=str)
      run_id = check.opt_str_param(run_id, "run_id", default=RUN_ID_PLACEHOLDER)
      mapping_key = check.opt_str_param(mapping_key, "mapping_key")
      dagster_type = check.opt_inst_param(dagster_type, "dagster_type", DagsterType)
      version = check.opt_str_param(version, "version")
      resource_config = check.opt_dict_param(resource_config, "resource_config", key_type=str)
      resources = check.opt_dict_param(resources, "resources", key_type=str)
      solid_def = check.opt_inst_param(solid_def, "solid_def", SolidDefinition)
      op_def = check.opt_inst_param(op_def, "op_def", OpDefinition)
  
      return OutputContext(
          step_key=step_key,
          name=name,
          pipeline_name=None,
          run_id=run_id,
          metadata=metadata,
          mapping_key=mapping_key,
          config=config,
          solid_def=solid_def,
          dagster_type=dagster_type,
          log_manager=initialize_console_manager(None),
          version=version,
          resource_config=resource_config,
          resources=resources,
          step_context=None,
          op_def=op_def,
      )
code_tokens: def build_output_context ( step_key : Optional [ str ] = None , name : Optional [ str ] = None , metadata : Optional [ Dict [ str , Any ] ] = None , run_id : Optional [ str ] = None , mapping_key : Optional [ str ] = None , config : Optional [ Any ] = None , dagster_type : Optional [ "DagsterType" ] = None , version : Optional [ str ] = None , resource_config : Optional [ Dict [ str , Any ] ] = None , resources : Optional [ Dict [ str , Any ] ] = None , solid_def : Optional [ SolidDefinition ] = None , op_def : Optional [ OpDefinition ] = None , ) -> "OutputContext" : from dagster . core . types . dagster_type import DagsterType from dagster . core . execution . context_creation_pipeline import initialize_console_manager step_key = check . opt_str_param ( step_key , "step_key" ) name = check . opt_str_param ( name , "name" ) metadata = check . opt_dict_param ( metadata , "metadata" , key_type = str ) run_id = check . opt_str_param ( run_id , "run_id" , default = RUN_ID_PLACEHOLDER ) mapping_key = check . opt_str_param ( mapping_key , "mapping_key" ) dagster_type = check . opt_inst_param ( dagster_type , "dagster_type" , DagsterType ) version = check . opt_str_param ( version , "version" ) resource_config = check . opt_dict_param ( resource_config , "resource_config" , key_type = str ) resources = check . opt_dict_param ( resources , "resources" , key_type = str ) solid_def = check . opt_inst_param ( solid_def , "solid_def" , SolidDefinition ) op_def = check . opt_inst_param ( op_def , "op_def" , OpDefinition ) return OutputContext ( step_key = step_key , name = name , pipeline_name = None , run_id = run_id , metadata = metadata , mapping_key = mapping_key , config = config , solid_def = solid_def , dagster_type = dagster_type , log_manager = initialize_console_manager ( None ) , version = version , resource_config = resource_config , resources = resources , step_context = None , op_def = op_def , )
short_docstring: Builds output context from provided parameters.
short_docstring_tokens: Builds output context from provided parameters .
comment: """Builds output context from provided parameters.
  
      ``build_output_context`` can be used as either a function, or a context manager. If resources
      that are also context managers are provided, then ``build_output_context`` must be used as a
      context manager.
  
      Args:
          step_key (Optional[str]): The step_key for the compute step that produced the output.
          name (Optional[str]): The name of the output that produced the output.
          metadata (Optional[Dict[str, Any]]): A dict of the metadata that is assigned to the
              OutputDefinition that produced the output.
          mapping_key (Optional[str]): The key that identifies a unique mapped output. None for regular outputs.
          config (Optional[Any]): The configuration for the output.
          dagster_type (Optional[DagsterType]): The type of this output.
          version (Optional[str]): (Experimental) The version of the output.
          resource_config (Optional[Dict[str, Any]]): The resource config to make available from the
              input context. This usually corresponds to the config provided to the resource that
              loads the output manager.
          resources (Optional[Resources]): The resources to make available from the context.
              For a given key, you can provide either an actual instance of an object, or a resource
              definition.
          solid_def (Optional[SolidDefinition]): The definition of the solid that produced the output.
          op_def (Optional[OpDefinition]): The definition of the solid that produced the output.
  
      Examples:
  
          .. code-block:: python
  
              build_output_context()
  
              with build_output_context(resources={"foo": context_manager_resource}) as context:
                  do_something
  
      """