class_docstr: A `Dataset` comprising records from one or more AvroRecord files.
class_docstr_tok: ["A","`","Dataset","`","comprising","records","from","one","or","more","AvroRecord","files","."]
docstr: optional_param_to_tensor
docstr_tok: ["optional_param_to_tensor"]
code: def __optional_param_to_tensor(
      argument_name,
      argument_value,
      argument_default=0,
      argument_dtype=tf.dtypes.int64,
  ):
      """optional_param_to_tensor"""
      if argument_value is not None:
          return tf.convert_to_tensor(
              argument_value, dtype=argument_dtype, name=argument_name
          )
      return tf.constant(
          argument_default, dtype=argument_dtype, name=argument_name
      )
  
file_path: io/tensorflow_io/python/experimental/avro_record_dataset_ops.py
imports: import tensorflow
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 2 for calling the _AvroRecordDataset obj's underlying member method code with example usage: obj.__optional_param_to_tensor(argument_name, argument_value, argument_default, argument_dtype) and returns: tf, tf