def _format_iso_time(self, time):
if isinstance(time, str):<EOL><INDENT>return time<EOL><DEDENT>elif isinstance(time, datetime):<EOL><INDENT>return time.strftime('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Makes sure we have proper ISO 8601 time.

        :param time: either already ISO 8601 a string or datetime.datetime
        :returns: ISO 8601 time
        :rtype: str