code: def _get_flat_value(self, tensor):
      rank = len(tensor.shape.as_list())
      value = tensor.numpy()
      if (
          tensor.dtype == tf.string and rank == 0
      ):  # There is no tolist() method for bytes or string
          return value
      return value.tolist()
  
imports: import os
  import hashlib
  import json
  import numpy
  import tensorflow
  from avro.schema import Parse
  from avro.datafile import DataFileWriter
  from avro.io import DatumWriter
  from tests.test_atds_avro.utils.file_writer import FileWriter
  from tests.test_atds_avro.utils.generator.varlen_tensor_generator import VarLenTensorGeneratorBase
  from tensorflow_io.python.experimental.atds.features import DenseFeature, SparseFeature, VarlenFeature
label_desc: Use image node_id 14 for calling the ATDSWriter obj's underlying member method code with example usage: obj._get_flat_value(tensor) and returns: value, value