def cast_to_swimlane(self, value):
if value is None:<EOL><INDENT>return value<EOL><DEDENT>if self.input_type == self._type_interval:<EOL><INDENT>return value.in_seconds() * <NUM_LIT:1000><EOL><DEDENT>return self.format_datetime(value)<EOL>
Return datetimes formatted as expected by API and timespans as millisecond epochs