code: def downsample_minute_return_series(
      cls, trading_calendar, minutely_returns
  ):
      sessions = trading_calendar.minute_index_to_session_labels(
          minutely_returns.index,
      )
      closes = trading_calendar.session_closes_in_range(
          sessions[0],
          sessions[-1],
      )
      daily_returns = minutely_returns[closes].pct_change()
      daily_returns.index = closes.index
      return daily_returns.iloc[1:]
  
file_path: zipline/zipline/sources/benchmark_source.py
imports: import pandas
  from zipline.errors import InvalidBenchmarkAsset, BenchmarkAssetNotAvailableTooEarly, BenchmarkAssetNotAvailableTooLate
label_desc: Use image node_id 7 for calling the BenchmarkSource obj's underlying member method code with example usage: obj.downsample_minute_return_series(cls, trading_calendar, minutely_returns) and returns: daily_returns