def get_tensor_data(tensor_data_array, tensor_name):
  """Find the tensor data for this tensor by its name."""
  for i in range(len(tensor_data_array.data_array)):
    if tensor_data_array.data_array[i].name == tensor_name:
      return tensor_data_array.data_array[i]
  return None