code: def compute_block_upper(index, shape):
      if len(index) != len(shape):
          raise Exception(
              "The fields `index` and `shape` must have the "
              "same length, but `index` is {} and `shape` is "
              "{}.".format(index, shape)
          )
      upper = []
      for i in range(len(shape)):
          upper.append(min((index[i] + 1) * BLOCK_SIZE, shape[i]))
      return upper
  
imports: import numpy
  import ray
  import ray.experimental.array.remote
label_desc: Use image node_id 3 for calling the DistArray obj's underlying member method code with example usage: obj.compute_block_upper(index, shape) and returns: upper