def _check_type_compatibility(self, type_name1, type_name2,
                                operation):
    """Check if two types can be used with an operation.

    Args:
      type_name1: A string name for a type
      type_name2: A string name for a type
      operation: A string description of the operation.

    Raises:
      TypeCompatibilityError: If incomptaible.
    """
    if type_name1 != type_name2:
      raise TypeCompatibilityError(type_name1, type_name2, operation)
Check if two types can be used with an operation.

    Args:
      type_name1: A string name for a type
      type_name2: A string name for a type
      operation: A string description of the operation.

    Raises:
      TypeCompatibilityError: If incomptaible.
    
language/nql/nql/__init__.py