def _maybe_cast_slice_bound(self, label, side, kind):
assert kind in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', None]<EOL>if is_float(label) or isinstance(label, time) or is_integer(label):<EOL><INDENT>self._invalid_indexer('<STR_LIT>', label)<EOL><DEDENT>if isinstance(label, str):<EOL><INDENT>freq = getattr(self, '<STR_LIT>',<EOL>getattr(self, '<STR_LIT>', None))<EOL>_, parsed, reso = parsing.parse_time_string(label, freq)<EOL>lower, upper = self._parsed_string_to_bounds(reso, parsed)<EOL>if self._is_strictly_monotonic_decreasing and len(self) > <NUM_LIT:1>:<EOL><INDENT>return upper if side == '<STR_LIT:left>' else lower<EOL><DEDENT>return lower if side == '<STR_LIT:left>' else upper<EOL><DEDENT>else:<EOL><INDENT>return label<EOL><DEDENT>
If label is a string, cast it to datetime according to resolution.

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

Returns
-------
label :  object

Notes
-----
Value of `side` parameter should be validated in caller.