code: def make_unique_script_attr(attributes):
      
      filtered_attr = []
      script_list = []
      for attr in attributes:
          if attr.Usage != TransactionAttributeUsage.Script:
              filtered_attr.append(attr)
          else:
              data = attr.Data
              if isinstance(data, UInt160):
                  # convert it to equal type
                  data = attr.Data.ToArray()
  
              # only add if it's not already in the list
              if data not in script_list:
                  script_list.append(data)
                  filtered_attr.append(attr)
  
      return filtered_attr
docs: Filter out duplicate `Script` TransactionAttributeUsage types.
      Args:
          attributes: a list of TransactionAttribute's
  
      Returns:
          list: