code: def _process_features(self, datum):
      if len(datum) != 2:
          raise ValueError(
              "Expected tuples of ({}_id, features), "
              "got {}.".format(self._entity_type, datum)
          )
  
      entity_id, features = datum
  
      if entity_id not in self._id_mapping:
          raise ValueError(
              "{entity_type} id {entity_id} not in {entity_type} id mappings.".format(
                  entity_type=self._entity_type, entity_id=entity_id
              )
          )
  
      idx = self._id_mapping[entity_id]
  
      for feature, weight in self._iter_features(features):
          if feature not in self._feature_mapping:
              raise ValueError(
                  "Feature {} not in feature mapping. "
                  "Call fit first.".format(feature)
              )
  
          feature_idx = self._feature_mapping[feature]
  
          yield (idx, feature_idx, weight)
  
imports: import array
  import numpy
  import scipy.sparse
  import sklearn.preprocessing
label_desc: Use image node_id 4 for calling the _FeatureBuilder obj's underlying member method code with example usage: obj._process_features(datum) without return types