def validate_time_inversion(self):
if not self.is_set():<EOL><INDENT>raise TypeError<EOL><DEDENT>if self.start_datetime > self.end_datetime:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(<EOL>str(self.start_datetime), str(self.end_datetime)<EOL>)<EOL>)<EOL><DEDENT>
Check time inversion of the time range.

:raises ValueError:
    If |attr_start_datetime| is
    bigger than |attr_end_datetime|.
:raises TypeError:
    Any one of |attr_start_datetime| and |attr_end_datetime|,
    or both is inappropriate datetime value.

:Sample Code:
    .. code:: python

        from datetimerange import DateTimeRange
        time_range = DateTimeRange("2015-03-22T10:10:00+0900", "2015-03-22T10:00:00+0900")
        try:
            time_range.validate_time_inversion()
        except ValueError:
            print "time inversion"
:Output:
    .. parsed-literal::

        time inversion