<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def AssertType(value, expected_type):
 """Ensures that given value has certain type. Args: value: A value to assert the type for. expected_type: An expected type for the given value. Raises: TypeError: If given value does not have the expected type. """

  if not isinstance(value, expected_type):
    message = "Expected type `%r`, but got value `%r` of type `%s`"
    message %= (expected_type, value, type(value))
    raise TypeError(message)