def _parsed_string_to_bounds(self, reso, parsed):
valid_resos = {'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'}<EOL>if reso not in valid_resos:<EOL><INDENT>raise KeyError<EOL><DEDENT>if reso == '<STR_LIT>':<EOL><INDENT>start = Timestamp(parsed.year, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>end = Timestamp(parsed.year, <NUM_LIT:12>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>)<EOL><DEDENT>elif reso == '<STR_LIT>':<EOL><INDENT>d = ccalendar.get_days_in_month(parsed.year, parsed.month)<EOL>start = Timestamp(parsed.year, parsed.month, <NUM_LIT:1>)<EOL>end = Timestamp(parsed.year, parsed.month, d, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>)<EOL><DEDENT>elif reso == '<STR_LIT>':<EOL><INDENT>qe = (((parsed.month - <NUM_LIT:1>) + <NUM_LIT:2>) % <NUM_LIT:12>) + <NUM_LIT:1>  <EOL>d = ccalendar.get_days_in_month(parsed.year, qe)  <EOL>start = Timestamp(parsed.year, parsed.month, <NUM_LIT:1>)<EOL>end = Timestamp(parsed.year, qe, d, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>)<EOL><DEDENT>elif reso == '<STR_LIT>':<EOL><INDENT>start = Timestamp(parsed.year, parsed.month, parsed.day)<EOL>end = start + timedelta(days=<NUM_LIT:1>) - Nano(<NUM_LIT:1>)<EOL><DEDENT>elif reso == '<STR_LIT>':<EOL><INDENT>start = Timestamp(parsed.year, parsed.month, parsed.day,<EOL>parsed.hour)<EOL>end = start + timedelta(hours=<NUM_LIT:1>) - Nano(<NUM_LIT:1>)<EOL><DEDENT>elif reso == '<STR_LIT>':<EOL><INDENT>start = Timestamp(parsed.year, parsed.month, parsed.day,<EOL>parsed.hour, parsed.minute)<EOL>end = start + timedelta(minutes=<NUM_LIT:1>) - Nano(<NUM_LIT:1>)<EOL><DEDENT>elif reso == '<STR_LIT>':<EOL><INDENT>start = Timestamp(parsed.year, parsed.month, parsed.day,<EOL>parsed.hour, parsed.minute, parsed.second)<EOL>end = start + timedelta(seconds=<NUM_LIT:1>) - Nano(<NUM_LIT:1>)<EOL><DEDENT>elif reso == '<STR_LIT>':<EOL><INDENT>start = Timestamp(parsed.year, parsed.month, parsed.day,<EOL>parsed.hour, parsed.minute, parsed.second,<EOL>parsed.microsecond)<EOL>end = start + timedelta(microseconds=<NUM_LIT:1>) - Nano(<NUM_LIT:1>)<EOL><DEDENT>if parsed.tzinfo is not None:<EOL><INDENT>if self.tz is None:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>start = start.tz_localize(parsed.tzinfo).tz_convert(self.tz)<EOL>end = end.tz_localize(parsed.tzinfo).tz_convert(self.tz)<EOL><DEDENT>elif self.tz is not None:<EOL><INDENT>start = start.tz_localize(self.tz)<EOL>end = end.tz_localize(self.tz)<EOL><DEDENT>return start, end<EOL>
Calculate datetime bounds for parsed time string and its resolution.

Parameters
----------
reso : Resolution
    Resolution provided by parsed string.
parsed : datetime
    Datetime from parsed string.

Returns
-------
lower, upper: pd.Timestamp