code: def expected_bar_values_2d(
      dates, assets, asset_info, colname, holes=None
  ):
      """
      Return an 2D array containing cls.expected_value(asset_id, date,
      colname) for each date/asset pair in the inputs.
  
      Missing locs are filled with 0 for volume and NaN for price columns:
  
          - Values before/after an asset's lifetime.
          - Values for asset_ids not contained in asset_info.
          - Locs defined in `holes`.
      """
      if colname == "volume":
          dtype = uint32
          missing = 0
      else:
          dtype = float64
          missing = float("nan")
  
      data = full((len(dates), len(assets)), missing, dtype=dtype)
      for j, asset in enumerate(assets):
          # Use missing values when asset_id is not contained in asset_info.
          if asset not in asset_info.index:
              continue
  
          start = asset_start(asset_info, asset)
          end = asset_end(asset_info, asset)
          for i, date in enumerate(dates):
              # No value expected for dates outside the asset's start/end
              # date.
              if not (start <= date <= end):
                  continue
  
              if holes is not None:
                  expected = expected_bar_value_with_holes(
                      asset,
                      date,
                      colname,
                      holes,
                      missing,
                  )
              else:
                  expected = expected_bar_value(asset, date, colname)
  
              data[i, j] = expected
      return data
  
imports: from interface import implements
  from numpy import arange, array, eye, float64, full, iinfo, nan, uint32
  from numpy.random import RandomState
  from pandas import DataFrame, Timestamp
  from six import iteritems
  from sqlite3 import connect
  from .base import PipelineLoader
  from .frame import DataFrameLoader
  from zipline.data.adjustments import SQLiteAdjustmentReader, SQLiteAdjustmentWriter
  from zipline.data.bcolz_daily_bars import US_EQUITY_PRICING_BCOLZ_COLUMNS
  from zipline.utils.numpy_utils import bool_dtype, datetime64ns_dtype, float64_dtype, int64_dtype, object_dtype
label_desc: Use image node_id 7 for calling a global function with example usage: expected_bar_values_2d(dates, assets, asset_info, colname, holes) and returns: data