def invert_features(features):
  """Make a dict in the form source column : set of transforms.

  Note that the key transform is removed.
  """
  inverted_features = collections.defaultdict(list)
  for transform in six.itervalues(features):
    source_column = transform['source_column']
    inverted_features[source_column].append(transform)

  return dict(inverted_features)
Make a dict in the form source column : set of transforms.

  Note that the key transform is removed.