code: def process_equities(
      equities: List[str], mask: types.IntTensor = None
  ) -> Tuple[List[str], List[int]]:
      """Extracts unique equities and computes an integer mask.
  
      #### Example
  
      ```python
      process_equities(["GOOG", "MSFT", "GOOG", "GOOG"])
      # Returns
      (['GOOG', 'MSFT'], [0, 1, 0, 0])
      ```
  
      Args:
        equities: A list of equity names.
        mask: An optional integer mask for the sorted equity sequence. If supplied,
         becomes a no-op.
  
      Returns:
        A Tuple of `(equities, mask)` where  `equities` is a list of unique sorted
        equities and `mask` is a list of integers which is the mask for `equities`.
      """
      equity_list = cashflow_streams.to_list(equities)
      if mask is not None:
          return equity_list, mask
      # Note that `create_mask` sorts `equity_list`.
      (
          mask,
          mask_map,
          num_unique_equities,
      ) = cashflow_streams.create_mask(equity_list)
      equity_types = [mask_map[i] for i in range(num_unique_equities)]
      return equity_types, mask
  
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 1 for calling a global function with example usage: process_equities(equities, mask) and returns: equity_types,  mask, equity_list,  mask