code: def _write(self, index, value, name=None):
      if isinstance(index, EagerTensor):
          index = ivy.to_scalar(index.ivy_array)
  
      if index < 0:
          raise IndexError(
              f"Reading from negative indices {index} is not allowed."
          )
  
      size = len(self._tensor_array)
      if index >= size:
          if not self._dynamic_size:
              raise IndexError(
                  "Tried to write to index {index} but array is not resizeable and"
                  " size is: {size}"
              )
          self._tensor_array.extend(
              None for _ in range(index - size + 1)
          )
  
      if not isinstance(value, EagerTensor):
          value = tf_frontend.cast(value, self.dtype)
  
      if self._dtype != value.dtype:
          raise ValueError(
              f"TensorArray dtype is {self._dtype} but Op is trying to write dtype"
              f" {value.dtype} "
          )
  
      if self._infer_shape:
          self._element_shape = self._merge_shape(value)
  
      self._tensor_array[index] = value
  
imports: import weakref
  import ivy
  import ivy.functional.frontends.tensorflow
  from ivy.functional.frontends.tensorflow import EagerTensor
label_desc: Use image node_id 11 for calling the TensorArray obj's underlying member method code with example usage: obj._write(index, value, name) without return types