def _maybe_cast_slice_bound(self, label, side, kind):
assert kind in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', None]<EOL>if isinstance(label, str):<EOL><INDENT>parsed = Timedelta(label)<EOL>lbound = parsed.round(parsed.resolution)<EOL>if side == '<STR_LIT:left>':<EOL><INDENT>return lbound<EOL><DEDENT>else:<EOL><INDENT>return (lbound + to_offset(parsed.resolution) -<EOL>Timedelta(<NUM_LIT:1>, '<STR_LIT>'))<EOL><DEDENT><DEDENT>elif ((is_integer(label) or is_float(label)) and<EOL>not is_timedelta64_dtype(label)):<EOL><INDENT>self._invalid_indexer('<STR_LIT>', label)<EOL><DEDENT>return label<EOL>
If label is a string, cast it to timedelta according to resolution.


Parameters
----------
label : object
side : {'left', 'right'}
kind : {'ix', 'loc', 'getitem'}

Returns
-------
label :  object