code: def distinct_by_t(func):
      
      def distinct_by(sequence):
          distinct_lookup = {}
          for element in sequence:
              key = func(element)
              if key not in distinct_lookup:
                  distinct_lookup[key] = element
          return distinct_lookup.values()
      return Transformation('distinct_by({0})'.format(name(func)), distinct_by, None)
docs: Transformation for Sequence.distinct_by
      :param func: distinct_by function
      :return: transformation