code: def sample_from_data(self, model, data):
          
          values = []
          for key, type_name in self.mapping:
              value_type = self.types[type_name]
              values.append(value_type(data[key]))
          if self.unwrap_sample:
              assert len(values) == 1
              return np.array(values[0])
          else:
              return np.array(values, dtype=object)
docs: Convert incoming sample *data* into a numpy array.
  
          :param model:
            The :class:`~Model` instance to use for making predictions.
          :param data:
            A dict-like with the sample's data, typically retrieved from
            ``request.args`` or similar.