code: def get_vol_surface(
      currencies: List[str],
      equity_types: List[str],
      market: pmd.ProcessedMarketData,
      mask: List[int],
  ) -> volatility_surface.VolatilitySurface:
      """Builds a batched volatility surface.
  
      Given a list of discount curve an integer mask, creates a discount curve
      object to compute discount factors against the list of discount curves.
  
      #### Example
      ```none
      currencies = ["USD", "GBP"]
      equity_types = ["GOOG", "EZJ"]
      # A mask to price a batch of 7 instruments with the corresponding discount
      # curves ["GOOG", "EZJ", "EZJ", "EZJ" "GOOG", "GOOG"].
      mask = [0, 1, 1, 1, 0, 0]
      market = MarketDataDict(...)
      get_vol_surface(currencies, equity_types, market, mask)
      # Returns a VolatilitySurface object that can compute a volatilities for a
      # batch of 6 expiry dates and strikes.
      ```
  
      Args:
        currencies: A list of underlying currencies.
        equity_types: A corresponding list of equity types.
        market: An instance of the processed market data.
        mask: An integer mask.
  
      Returns:
        An instance of `VolatilitySurface`.
      """
      vols = market.volatility_surface(currencies, equity_types)
      expiries = vols.node_expiries().ordinal()
      strikes = vols.node_strikes()
      volatilities = vols.node_volatilities()
      prepare_strikes = tf.gather(strikes, mask)
      prepare_vols = tf.gather(volatilities, mask)
      prepare_expiries = dateslib.dates_from_ordinals(
          tf.gather(expiries, mask)
      )
      # All curves are assumed to have the same interpolation method
      # TODO(b/168411153): Extend to the case with multiple curve configs.
      vol_surface = volatility_surface.VolatilitySurface(
          valuation_date=market.date,
          expiries=prepare_expiries,
          strikes=prepare_strikes,
          volatilities=prepare_vols,
          daycount_convention=vols.daycount_convention,
      )
      return vol_surface
  
file_path: tf-quant-finance/tf_quant_finance/experimental/pricing_platform/framework/equity_instruments/utils.py
imports: from typing import List, Tuple
  import tensorflow.compat.v2
  from tf_quant_finance import datetime
  from tf_quant_finance.experimental.pricing_platform.framework.core import processed_market_data
  from tf_quant_finance.experimental.pricing_platform.framework.core import types
  from tf_quant_finance.experimental.pricing_platform.framework.market_data import volatility_surface
  from tf_quant_finance.experimental.pricing_platform.framework.rate_instruments import cashflow_streams
label_desc: Use image node_id 2 for calling a global function with example usage: get_vol_surface(currencies, equity_types, market, mask) and returns: vol_surface