def market_exact(self, session, start_time: str, end_time: str) -> Session:
if session not in self.exch: return SessNA<EOL>ss = self.exch[session]<EOL>same_day = ss[<NUM_LIT:0>] < ss[-<NUM_LIT:1>]<EOL>if not start_time: s_time = ss[<NUM_LIT:0>]<EOL>else:<EOL><INDENT>s_time = param.to_hour(start_time)<EOL>if same_day: s_time = max(s_time, ss[<NUM_LIT:0>])<EOL><DEDENT>if not end_time: e_time = ss[-<NUM_LIT:1>]<EOL>else:<EOL><INDENT>e_time = param.to_hour(end_time)<EOL>if same_day: e_time = min(e_time, ss[-<NUM_LIT:1>])<EOL><DEDENT>if same_day and (s_time > e_time): return SessNA<EOL>return Session(start_time=s_time, end_time=e_time)<EOL>
Explicitly specify start time and end time

Args:
    session: predefined session
    start_time: start time in terms of HHMM string
    end_time: end time in terms of HHMM string

Returns:
    Session of start_time and end_time