code: def _parse_avro(
      serialized,
      reader_schema,
      names=None,
      sparse_keys=None,
      sparse_types=None,
      sparse_ranks=None,
      dense_keys=None,
      dense_types=None,
      dense_defaults=None,
      dense_shapes=None,
      name=None,
      avro_num_minibatches=0,
  ):
      """Parses Avro records.
  
      Args:
          serialized: A vector (1-D Tensor) of strings, a batch of binary
          serialized `Example` protos.
          reader_schema: A scalar string representing the reader schema.
          names: A vector (1-D Tensor) of strings (optional), the names of
          the serialized protos.
          sparse_keys: A list of string keys in the examples' features.
          The results for these keys will be returned as `SparseTensor` objects.
          sparse_types: A list of `DTypes` of the same length as `sparse_keys`.
          Only `tf.float32` (`FloatList`), `tf.int64` (`Int64List`),
          and `tf.string` (`BytesList`) are supported.
          sparse_ranks: ranks of sparse feature. `tf.int64` (`Int64List`) is supported.
          dense_keys: A list of string keys in the examples' features.
          The results for these keys will be returned as `Tensor`s
          dense_types: A list of DTypes of the same length as `dense_keys`.
          Only `tf.float32` (`FloatList`), `tf.int64` (`Int64List`),
          and `tf.string` (`BytesList`) are supported.
          dense_defaults: A dict mapping string keys to `Tensor`s.
          The keys of the dict must match the dense_keys of the feature.
          dense_shapes: A list of tuples with the same length as `dense_keys`.
          The shape of the data for each dense feature referenced by `dense_keys`.
          Required for any input tensors identified by `dense_keys`.  Must be
          either fully defined, or may contain an unknown first dimension.
          An unknown first dimension means the feature is treated as having
          a variable number of blocks, and the output shape along this dimension
          is considered unknown at graph build time.  Padding is applied for
          minibatch elements smaller than the maximum number of blocks for the
          given feature along this dimension.
          name: A name for this operation (optional).
      Returns:
          A `dict` mapping keys to `Tensor`s and `SparseTensor`s.
      """
      with tf.name_scope(name or "ParseAvro"):
          (
              names,
              dense_defaults_vec,
              sparse_keys,
              sparse_types,
              dense_keys,
              dense_shapes,
              _,
          ) = _process_raw_parameters(
              names,
              dense_defaults,
              sparse_keys,
              sparse_types,
              dense_keys,
              dense_types,
              dense_shapes,
          )
  
          outputs = core_ops.io_parse_avro(
              serialized=serialized,
              reader_schema=reader_schema,
              names=names,
              dense_defaults=dense_defaults_vec,
              sparse_keys=sparse_keys,
              sparse_types=sparse_types,
              num_sparse=len(sparse_keys),
              sparse_ranks=sparse_ranks,
              dense_keys=dense_keys,
              dense_shapes=dense_shapes,
              name=name,
              avro_num_minibatches=avro_num_minibatches,
          )
  
          (
              sparse_indices,
              sparse_values,
              sparse_shapes,
              dense_values,
          ) = outputs
  
          sparse_tensors = [
              tf.sparse.SparseTensor(ix, val, shape)
              for (ix, val, shape) in zip(
                  sparse_indices, sparse_values, sparse_shapes
              )
          ]
  
          return dict(
              zip(
                  sparse_keys + dense_keys,
                  sparse_tensors + dense_values,
              )
          )
  
file_path: io/tensorflow_io/python/experimental/parse_avro_ops.py
imports: import collections
  import re
  import tensorflow
  import tensorflow_io
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 2 for calling a global function with example usage: _parse_avro(serialized, reader_schema, names, sparse_keys, sparse_types, sparse_ranks, dense_keys, dense_types, dense_defaults, dense_shapes, name, avro_num_minibatches) and returns: dict