Ensures that given dictionary is actually a dictionary of specified type.

  Args:
    dct: A dictionary to assert the type for.
    expected_key_type: An expected type for dictionary keys.
    expected_value_type: An expected type for dictionary values.

  Raises:
    TypeError: If given dictionary is not really a dictionary or not all its
               keys and values have the expected type.

def AssertDictType(dct, expected_key_type, expected_value_type):
  """Ensures that given dictionary is actually a dictionary of specified type.

  Args:
    dct: A dictionary to assert the type for.
    expected_key_type: An expected type for dictionary keys.
    expected_value_type: An expected type for dictionary values.

  Raises:
    TypeError: If given dictionary is not really a dictionary or not all its
               keys and values have the expected type.
  """
  AssertType(dct, dict)
  for key, value in iteritems(dct):
    AssertType(key, expected_key_type)
    AssertType(value, expected_value_type)