code: def get_open_and_closes(
      trading_days, early_closes, get_open_and_close
  ):
      open_and_closes = pd.DataFrame(
          index=trading_days, columns=("market_open", "market_close")
      )
  
      get_o_and_c = partial(
          get_open_and_close, early_closes=early_closes
      )
  
      (
          open_and_closes["market_open"],
          open_and_closes["market_close"],
      ) = zip(*open_and_closes.index.map(get_o_and_c))
  
      return open_and_closes
  
file_path: zipline/zipline/utils/tradingcalendar.py
imports: import pandas
  import pytz
  from datetime import datetime
  from dateutil import rrule
  from functools import partial
label_desc: Use image node_id 6 for calling a global function with example usage: get_open_and_closes(trading_days, early_closes, get_open_and_close) and returns: open_and_closes