docstr: Compute the given TermGraph, seeding the workspace of our engine with
  `initial_workspace`.
  
  Parameters
  ----------
  graph : zipline.pipeline.graph.ExecutionPlan
      Graph to run.
  initial_workspace : dict
      Initial workspace to forward to SimplePipelineEngine.compute_chunk.
  mask : DataFrame, optional
      This is a value to pass to `initial_workspace` as the mask from
      `AssetExists()`.  Defaults to a frame of shape `self.default_shape`
      containing all True values.
  
  Returns
  -------
  results : dict
      Mapping from termname -> computed result.
docstr_tok: ["Compute","the","given","TermGraph",",","seeding","the","workspace","of","our","engine","with","`","initial_workspace","`",".","Parameters","--","--","--","--","--","graph",":","zipline.pipeline.graph.ExecutionPlan","Graph","to","run",".","initial_workspace",":","dict","Initial","workspace","to","forward","to","SimplePipelineEngine.compute_chunk",".","mask",":","DataFrame",",","optional","This","is","a","value","to","pass","to","`","initial_workspace","`","as","the","mask","from","`","AssetExists","(",")","`",".","Defaults","to","a","frame","of","shape","`","self.default_shape","`","containing","all","True","values",".","Returns","--","--","--","-","results",":","dict","Mapping","from","termname","-",">","computed","result","."]
code: def run_graph(self, graph, initial_workspace, mask=None):
      """
      Compute the given TermGraph, seeding the workspace of our engine with
      `initial_workspace`.
  
      Parameters
      ----------
      graph : zipline.pipeline.graph.ExecutionPlan
          Graph to run.
      initial_workspace : dict
          Initial workspace to forward to SimplePipelineEngine.compute_chunk.
      mask : DataFrame, optional
          This is a value to pass to `initial_workspace` as the mask from
          `AssetExists()`.  Defaults to a frame of shape `self.default_shape`
          containing all True values.
  
      Returns
      -------
      results : dict
          Mapping from termname -> computed result.
      """
  
      def get_loader(c):
          raise AssertionError(
              "run_graph() should not require any loaders!"
          )
  
      engine = SimplePipelineEngine(
          get_loader,
          self.asset_finder,
          default_domain=US_EQUITIES,
      )
      if mask is None:
          mask = self.default_asset_exists_mask
  
      dates, sids, mask_values = explode(mask)
  
      initial_workspace.setdefault(AssetExists(), mask_values)
      initial_workspace.setdefault(InputDates(), dates)
  
      refcounts = graph.initial_refcounts(initial_workspace)
      execution_order = graph.execution_order(
          initial_workspace, refcounts
      )
  
      return engine.compute_chunk(
          graph=graph,
          dates=dates,
          sids=sids,
          workspace=initial_workspace,
          execution_order=execution_order,
          refcounts=refcounts,
          hooks=NoHooks(),
      )
  
imports: import numpy
  from numpy import arange, prod
  from pandas import DataFrame, Timestamp
  from six import iteritems
  from zipline.lib.labelarray import LabelArray
  from zipline.utils.compat import wraps
  from zipline.pipeline import ExecutionPlan
  from zipline.pipeline.domain import US_EQUITIES
  from zipline.pipeline.engine import SimplePipelineEngine
  from zipline.pipeline.hooks import NoHooks
  from zipline.pipeline.term import AssetExists, InputDates
  from zipline.testing import check_arrays
  from zipline.testing.fixtures import WithAssetFinder, WithTradingSessions, ZiplineTestCase
  from zipline.utils.functional import dzip_exact
  from zipline.utils.pandas_utils import explode
label_desc: Use image node_id 3 for calling the BaseUSEquityPipelineTestCase obj's underlying member method code with example usage: obj.run_graph(graph, initial_workspace, mask) and returns: engine