class_docstr: A Pipeline object represents a collection of named expressions to be
  compiled and executed by a PipelineEngine.
  
  A Pipeline has two important attributes: 'columns', a dictionary of named
  :class:`~zipline.pipeline.Term` instances, and 'screen', a
  :class:`~zipline.pipeline.Filter` representing criteria for
  including an asset in the results of a Pipeline.
  
  To compute a pipeline in the context of a TradingAlgorithm, users must call
  ``attach_pipeline`` in their ``initialize`` function to register that the
  pipeline should be computed each trading day. The most recent outputs of an
  attached pipeline can be retrieved by calling ``pipeline_output`` from
  ``handle_data``, ``before_trading_start``, or a scheduled function.
  
  Parameters
  ----------
  columns : dict, optional
      Initial columns.
  screen : zipline.pipeline.Filter, optional
      Initial screen.
class_docstr_tok: ["A","Pipeline","object","represents","a","collection","of","named","expressions","to","be","compiled","and","executed","by","a","PipelineEngine",".","A","Pipeline","has","two","important","attributes",":","'columns","'",",","a","dictionary","of","named",":","class",":","`","~zipline.pipeline.Term","`","instances",",","and","'screen","'",",","a",":","class",":","`","~zipline.pipeline.Filter","`","representing","criteria","for","including","an","asset","in","the","results","of","a","Pipeline",".","To","compute","a","pipeline","in","the","context","of","a","TradingAlgorithm",",","users","must","call","``","attach_pipeline","``","in","their","``","initialize","``","function","to","register","that","the","pipeline","should","be","computed","each","trading","day",".","The","most","recent","outputs","of","an","attached","pipeline","can","be","retrieved","by","calling","``","pipeline_output","``","from","``","handle_data","``",",","``","before_trading_start","``",",","or","a","scheduled","function",".","Parameters","--","--","--","--","--","columns",":","dict",",","optional","Initial","columns",".","screen",":","zipline.pipeline.Filter",",","optional","Initial","screen","."]
docstr: Get the domain for this pipeline.
  
  - If an explicit domain was provided at construction time, use it.
  - Otherwise, infer a domain from the registered columns.
  - If no domain can be inferred, return ``default``.
  
  Parameters
  ----------
  default : zipline.pipeline.domain.Domain
      Domain to use if no domain can be inferred from this pipeline by
      itself.
  
  Returns
  -------
  domain : zipline.pipeline.domain.Domain
      The domain for the pipeline.
  
  Raises
  ------
  AmbiguousDomain
  ValueError
      If the terms in ``self`` conflict with self._domain.
docstr_tok: ["Get","the","domain","for","this","pipeline",".","-","If","an","explicit","domain","was","provided","at","construction","time",",","use","it",".","-","Otherwise",",","infer","a","domain","from","the","registered","columns",".","-","If","no","domain","can","be","inferred",",","return","``","default","``",".","Parameters","--","--","--","--","--","default",":","zipline.pipeline.domain.Domain","Domain","to","use","if","no","domain","can","be","inferred","from","this","pipeline","by","itself",".","Returns","--","--","--","-","domain",":","zipline.pipeline.domain.Domain","The","domain","for","the","pipeline",".","Raises","--","--","--","AmbiguousDomain","ValueError","If","the","terms","in","``","self","``","conflict","with","self._domain","."]
code: def domain(self, default):
      """
      Get the domain for this pipeline.
  
      - If an explicit domain was provided at construction time, use it.
      - Otherwise, infer a domain from the registered columns.
      - If no domain can be inferred, return ``default``.
  
      Parameters
      ----------
      default : zipline.pipeline.domain.Domain
          Domain to use if no domain can be inferred from this pipeline by
          itself.
  
      Returns
      -------
      domain : zipline.pipeline.domain.Domain
          The domain for the pipeline.
  
      Raises
      ------
      AmbiguousDomain
      ValueError
          If the terms in ``self`` conflict with self._domain.
      """
      # Always compute our inferred domain to ensure that it's compatible
      # with our explicit domain.
      inferred = infer_domain(self._output_terms)
  
      if inferred is GENERIC and self._domain is GENERIC:
          # Both generic. Fall back to default.
          return default
      elif inferred is GENERIC and self._domain is not GENERIC:
          # Use the non-generic domain.
          return self._domain
      elif inferred is not GENERIC and self._domain is GENERIC:
          # Use the non-generic domain.
          return inferred
      else:
          # Both non-generic. They have to match.
          if inferred is not self._domain:
              raise ValueError(
                  "Conflicting domains in Pipeline. Inferred {}, but {} was "
                  "passed at construction.".format(
                      inferred, self._domain
                  )
              )
          return inferred
  
imports: import six
  from zipline.errors import UnsupportedPipelineOutput
  from zipline.utils.input_validation import expect_element, expect_types, optional
  from .domain import Domain, GENERIC, infer_domain
  from .graph import ExecutionPlan, TermGraph, SCREEN_NAME
  from .filters import Filter
  from .term import AssetExists, ComputableTerm, Term
label_desc: Use image node_id 13 for calling the Pipeline obj's underlying member method code with example usage: obj.domain(default) and returns: default, self, inferred, inferred