class_docstr: Tests for verifying ProgressHooks.
      
class_docstr_tok: ["Tests","for","verifying","ProgressHooks","."]
code: def make_seeded_random_populate_initial_workspace(cls):
      # Populate valeus for PREPOPULATED_TERM. This is used to ensure that we
      # properly track progress when we skip prepopulated terms.
      def populate(
          initial_workspace,
          root_mask_term,
          execution_plan,
          dates,
          assets,
      ):
          if PREPOPULATED_TERM not in execution_plan:
              return initial_workspace
          elif dates[-1] > cls.PREPOPULATED_TERM_CUTOFF:
              return initial_workspace
  
          workspace = initial_workspace.copy()
          _, dates = execution_plan.mask_and_dates_for_term(
              PREPOPULATED_TERM,
              root_mask_term,
              workspace,
              dates,
          )
          shape = (len(dates), len(assets))
          workspace[PREPOPULATED_TERM] = np.zeros(shape, dtype=float)
          return workspace
  
      return populate
  
imports: import itertools
  from operator import attrgetter
  import numpy
  import pandas
  import toolz
  from zipline.pipeline import Pipeline
  from zipline.pipeline.classifiers import Everything
  from zipline.pipeline.domain import US_EQUITIES
  from zipline.pipeline.factors import CustomFactor
  from zipline.pipeline.data import Column, DataSet
  from zipline.pipeline.data.testing import TestingDataSet
  from zipline.pipeline.hooks.testing import TestingHooks
  from zipline.pipeline.hooks.progress import ProgressHooks, repr_htmlsafe, TestingProgressPublisher
  from zipline.pipeline.term import AssetExists, ComputableTerm, LoadableTerm
  from zipline.testing import parameter_space
  from zipline.testing.fixtures import ZiplineTestCase, WithSeededRandomPipelineEngine
  from zipline.testing.predicates import assert_almost_equal, instance_of
label_desc: Use image node_id 1 for calling the ProgressHooksTestCase obj's underlying member method code with example usage: obj.make_seeded_random_populate_initial_workspace(cls) and returns: populate, workspace, initial_workspace, initial_workspace