code: def update_entity(self, entity, agent=None, metadata=None):
          
          body = {}
          if agent:
              body["agent_id"] = utils.get_id(agent)
          if metadata:
              body["metadata"] = metadata
          if body:
              uri = "/%s/%s" % (self.uri_base, utils.get_id(entity))
              resp, body = self.api.method_put(uri, body=body)
docs: Updates the specified entity's values with the supplied parameters.