docstr: This function maps tensor dtype into the python type suppored by avro.
docstr_tok: ["This","function","maps","tensor","dtype","into","the","python","type","suppored","by","avro","."]
code: def _map_tensor_dtype_to_avro_dtype(self, dtype):
      """This function maps tensor dtype into the python type suppored by avro."""
      if dtype in ATDSWriter._DTYPE_TO_AVRO:
          return ATDSWriter._DTYPE_TO_AVRO[dtype]
      else:
          raise TypeError(f"Type {dtype} is not supported in Avro.")
  
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 8 for calling the ATDSWriter obj's underlying member method code with example usage: obj._map_tensor_dtype_to_avro_dtype(dtype) and returns: ATDSWriter