code: def similar(self, similarity):
          
          pattern = Pattern(self.path)
          pattern.similarity = similarity
          return pattern
docs: Returns a new Pattern with the specified similarity threshold