code: def test_roll_forward(self):
      #     January 2017
      # Su Mo Tu We Th Fr Sa
      #  1  2  3  4  5  6  7
  
      # the first three days of the year are holidays on the Tokyo exchange,
      # so the first trading day should be the fourth
      self.assertEqual(
          JP_EQUITIES.roll_forward("2017-01-01"),
          pd.Timestamp("2017-01-04", tz="UTC"),
      )
  
      # in US exchanges, the first trading day after 1/1 is the 3rd
      self.assertEqual(
          US_EQUITIES.roll_forward("2017-01-01"),
          pd.Timestamp("2017-01-03", tz="UTC"),
      )
  
      # passing a valid trading day to roll_forward should return that day
      self.assertEqual(
          JP_EQUITIES.roll_forward("2017-01-04"),
          pd.Timestamp("2017-01-04", tz="UTC"),
      )
  
      # passing a date before the first session should return the
      # first session
      before_first_session = (
          JP_EQUITIES.calendar.first_session - pd.Timedelta(days=20)
      )
  
      self.assertEqual(
          JP_EQUITIES.roll_forward(before_first_session),
          JP_EQUITIES.calendar.first_session,
      )
  
      # requesting a session beyond the last session raises an ValueError
      after_last_session = (
          JP_EQUITIES.calendar.last_session + pd.Timedelta(days=20)
      )
  
      with self.assertRaises(ValueError) as ve:
          JP_EQUITIES.roll_forward(after_last_session)
  
      self.assertEqual(
          str(ve.exception),
          "Date {} was past the last session for domain "
          "EquityCalendarDomain('JP', 'XTKS'). The last session for "
          "this domain is {}.".format(
              after_last_session.date(),
              JP_EQUITIES.calendar.last_session.date(),
          ),
      )
  
      # test that a roll_forward works with an EquitySessionDomain,
      # not just calendar domains
      sessions = pd.DatetimeIndex(
          ["2000-01-01", "2000-02-01", "2000-04-01", "2000-06-01"],
          tz="UTC",
      )
  
      session_domain = EquitySessionDomain(
          sessions, CountryCode.UNITED_STATES
      )
  
      self.assertEqual(
          session_domain.roll_forward("2000-02-01"),
          pd.Timestamp("2000-02-01", tz="UTC"),
      )
  
      self.assertEqual(
          session_domain.roll_forward("2000-02-02"),
          pd.Timestamp("2000-04-01", tz="UTC"),
      )
  
imports: from collections import namedtuple
  import datetime
  from textwrap import dedent
  import numpy
  import pandas
  import pytz
  from zipline.country import CountryCode
  from zipline.pipeline import Pipeline
  from zipline.pipeline.data import Column, DataSet
  from zipline.pipeline.data.testing import TestingDataSet
  from zipline.pipeline.domain import AmbiguousDomain, AR_EQUITIES, AT_EQUITIES, AU_EQUITIES, BE_EQUITIES, BR_EQUITIES, BUILT_IN_DOMAINS, CA_EQUITIES, CH_EQUITIES, CL_EQUITIES, CN_EQUITIES, CO_EQUITIES, CZ_EQUITIES, DE_EQUITIES, DK_EQUITIES, EquityCalendarDomain, EquitySessionDomain, ES_EQUITIES, FI_EQUITIES, FR_EQUITIES, GB_EQUITIES, GENERIC, GR_EQUITIES, HK_EQUITIES, HU_EQUITIES, ID_EQUITIES, IE_EQUITIES, IN_EQUITIES, infer_domain, IT_EQUITIES, JP_EQUITIES, KR_EQUITIES, MX_EQUITIES, MY_EQUITIES, NL_EQUITIES, NO_EQUITIES, NZ_EQUITIES, PE_EQUITIES, PH_EQUITIES, PK_EQUITIES, PL_EQUITIES, PT_EQUITIES, RU_EQUITIES, SE_EQUITIES, SG_EQUITIES, TH_EQUITIES, TR_EQUITIES, TW_EQUITIES, US_EQUITIES, ZA_EQUITIES
  from zipline.pipeline.factors import CustomFactor
  import zipline.testing.fixtures
  from zipline.testing.core import parameter_space, powerset
  from zipline.testing.predicates import assert_equal, assert_messages_equal
  from zipline.utils.pandas_utils import days_at_time
label_desc: Use image node_id 1 for calling the RollForwardTestCase obj's underlying member method code with example usage: obj.test_roll_forward() without return types