parameters: (data, schema, name=None)
return_statement: return values
docstring: Encode Tensors into Avro string.
  
      Args:
          data: A list of Tensors to encode.
          schema: A string of the Avro schema.
          name: A name for the operation (optional).
  
      Returns:
          An Avro-encoded string Tensor.
docstring_summary: Encode Tensors into Avro string.
docstring_tokens: Encode Tensors into Avro string .
function: def encode_avro(data, schema, name=None):
      """
      Encode Tensors into Avro string.
  
      Args:
          data: A list of Tensors to encode.
          schema: A string of the Avro schema.
          name: A name for the operation (optional).
  
      Returns:
          An Avro-encoded string Tensor.
      """
      # TODO: Use resource to reuse schema initialization
      specs = process_entry(
          json.loads(schema.decode() if isinstance(schema, bytes) else schema), ""
      )
  
      entries = tf.nest.flatten(specs)
      names = [e.name for e in entries]
  
      data = tf.nest.flatten(data)
  
      values = core_ops.io_encode_avro(data, names, schema, name=name)
      return values
function_tokens: def encode_avro ( data , schema , name = None ) : # TODO: Use resource to reuse schema initialization specs = process_entry ( json . loads ( schema . decode ( ) if isinstance ( schema , bytes ) else schema ) , "" ) entries = tf . nest . flatten ( specs ) names = [ e . name for e in entries ] data = tf . nest . flatten ( data ) values = core_ops . io_encode_avro ( data , names , schema , name = name ) return values