code: def params_from_data(self, model, data):
          
          params = {}
          for key, type_name in self.params:
              value_type = self.types[type_name]
              if key in data:
                  params[key] = value_type(data[key])
              elif hasattr(model, key):
                  params[key] = getattr(model, key)
          return params
docs: Retrieve additional parameters (keyword arguments) for
          ``model.predict`` from request *data*.
  
          :param model:
            The :class:`~Model` instance to use for making predictions.
          :param data:
            A dict-like with the parameter data, typically retrieved
            from ``request.args`` or similar.