docs: def check_schema_transforms_match(schema, inverted_features):
    """Checks that the transform and schema do not conflict.
  
    Args:
      schema: schema list
      inverted_features: inverted_features dict
  
    Raises:
      ValueError if transform cannot be applied given schema type.
    """
    num_target_transforms = 0
  
    for col_schema in schema:
      col_name = col_schema['name']
      col_type = col_schema['type'].lower()
  
      # Check each transform and schema are compatible
      if col_name in inverted_features:
        for transform in inverted_features[col_name]:
          transform_name = transform['transform']
          if transform_name == constant.TARGET_TRANSFORM:
            num_target_transforms += 1
            continue
  
          elif col_type in constant.NUMERIC_SCHEMA:
            if transform_name not in constant.NUMERIC_TRANSFORMS:
              raise ValueError(
                  'Transform %s not supported by schema %s' % (transform_name, col_type))
          elif col_type == constant.STRING_SCHEMA:
            if (transform_name not in constant.CATEGORICAL_TRANSFORMS + constant.TEXT_TRANSFORMS and
               transform_name != constant.IMAGE_TRANSFORM):
              raise ValueError(
                  'Transform %s not supported by schema %s' % (transform_name, col_type))
          else:
            raise ValueError('Unsupported schema type %s' % col_type)
  
      # Check each transform is compatible for the same source column.
      # inverted_features[col_name] should belong to exactly 1 of the 5 groups.
      if col_name in inverted_features:
        transform_set = {x['transform'] for x in inverted_features[col_name]}
        if 1 != sum([transform_set.issubset(set(constant.NUMERIC_TRANSFORMS)),
                     transform_set.issubset(set(constant.CATEGORICAL_TRANSFORMS)),
                     transform_set.issubset(set(constant.TEXT_TRANSFORMS)),
                     transform_set.issubset(set([constant.IMAGE_TRANSFORM])),
                     transform_set.issubset(set([constant.TARGET_TRANSFORM]))]):
          message = """
            The source column of a feature can only be used in multiple
            features within the same family of transforms. The familes are
  
            1) text transformations: %s
            2) categorical transformations: %s
            3) numerical transformations: %s
            4) image transformations: %s
            5) target transform: %s
  
            Any column can also be a key column.
  
            But column %s is used by transforms %s.
            """ % (str(constant.TEXT_TRANSFORMS),
                   str(constant.CATEGORICAL_TRANSFORMS),
                   str(constant.NUMERIC_TRANSFORMS),
                   constant.IMAGE_TRANSFORM,
                   constant.TARGET_TRANSFORM,
                   col_name,
                   str(transform_set))
          raise ValueError(message)
  
    if num_target_transforms != 1:
      raise ValueError('Must have exactly one target transform')