code: def overrules(self, other):
          
          if other.is_primary():
              return False
          elif self.is_simple_index() and other.is_unique():
              return False
  
          same_columns = self.spans_columns(other.get_columns())
          if (
              same_columns
              and (self.is_primary() or self.is_unique())
              and self.same_partial_index(other)
          ):
              return True
  
          return False
docs: Detects if the other index is a non-unique, non primary index
          that can be overwritten by this one.
  
          :param other: The other index
          :type other: Index
  
          :rtype: bool