class_docstr: PartitionedFunction will translate call to cached Function call
class_docstr_tok: ["PartitionedFunction","will","translate","call","to","cached","Function","call"]
code: def __call__(self, resource, start, stop):
      indices_start = tf.math.maximum(self._partitions_start, start)
      indices_stop = tf.math.minimum(self._partitions_stop, stop)
      indices_hit = tf.math.less(indices_start, indices_stop)
      indices = tf.squeeze(tf.compat.v2.where(indices_hit), [1])
      items = []
      # TODO: change to tf.while_loop
      for index in indices:
          if self._tensors[index] is None:
              self._tensors[index] = self._func(
                  resource,
                  self._partitions_start[index],
                  self._partitions_stop[index],
              )
          slice_start = (
              indices_start[index] - self._partitions_start[index]
          )
          slice_size = indices_stop[index] - indices_start[index]
          item = tf.slice(
              self._tensors[index], [slice_start], [slice_size]
          )
          items.append(item)
      return tf.concat(items, axis=0)
  
imports: import tensorflow
label_desc: Use image node_id 2 for calling the _IOTensorPartitionedFunction obj's underlying member method code with example usage: obj.__call__(resource, start, stop) and returns: tf