code: def update_or_create(self, attributes, values=None):
          
          instance = self.first_or_new(**attributes)
  
          instance.fill(values)
  
          instance.save()
  
          return instance
docs: Create or update a related record matching the attributes, and fill it with values.
  
          :param attributes: The attributes
          :type attributes: dict
  
          :param values: The values
          :type values: dict
  
          :rtype: Model