class_docstr: Represents a file asset to hermetically include in a SavedModel.
  
  A SavedModel can include arbitrary files, called assets, that are needed
  for its use. For example a vocabulary file used initialize a lookup table.
  
  When a trackable object is exported via `tf.saved_model.save()`, all the
  `Asset`s reachable from it are copied into the SavedModel assets directory.
  Upon loading, the assets and the serialized functions that depend on them
  will refer to the correct filepaths inside the SavedModel directory.
  
  Example:
  
  ```
  filename = tf.saved_model.Asset("file.txt")
  
  @tf.function(input_signature=[])
  def func():
    return tf.io.read_file(filename)
  
  trackable_obj = tf.train.Checkpoint()
  trackable_obj.func = func
  trackable_obj.filename = filename
  tf.saved_model.save(trackable_obj, "/tmp/saved_model")
  
  # The created SavedModel is hermetic, it does not depend on
  # the original file and can be moved to another path.
  tf.io.gfile.remove("file.txt")
  tf.io.gfile.rename("/tmp/saved_model", "/tmp/new_location")
  
  reloaded_obj = tf.saved_model.load("/tmp/new_location")
  print(reloaded_obj.func())
  ```
  
  Attributes:
    asset_path: A path, or a 0-D `tf.string` tensor with path to the asset.
class_docstr_tok: ["Represents","a","file","asset","to","hermetically","include","in","a","SavedModel",".","A","SavedModel","can","include","arbitrary","files",",","called","assets",",","that","are","needed","for","its","use",".","For","example","a","vocabulary","file","used","initialize","a","lookup","table",".","When","a","trackable","object","is","exported","via","`","tf.saved_model.save","(",")","`",",","all","the","`","Asset","`","s","reachable","from","it","are","copied","into","the","SavedModel","assets","directory",".","Upon","loading",",","the","assets","and","the","serialized","functions","that","depend","on","them","will","refer","to","the","correct","filepaths","inside","the","SavedModel","directory",".","Example",":","``","`","filename","=","tf.saved_model.Asset","(","``","file.txt","''",")","@","tf.function","(","input_signature=","[","]",")","def","func","(",")",":","return","tf.io.read_file","(","filename",")","trackable_obj","=","tf.train.Checkpoint","(",")","trackable_obj.func","=","func","trackable_obj.filename","=","filename","tf.saved_model.save","(","trackable_obj",",","``","\/tmp\/saved_model","''",")","#","The","created","SavedModel","is","hermetic",",","it","does","not","depend","on","#","the","original","file","and","can","be","moved","to","another","path",".","tf.io.gfile.remove","(","``","file.txt","''",")","tf.io.gfile.rename","(","``","\/tmp\/saved_model","''",",","``","\/tmp\/new_location","''",")","reloaded_obj","=","tf.saved_model.load","(","``","\/tmp\/new_location","''",")","print","(","reloaded_obj.func","(",")",")","``","`","Attributes",":","asset_path",":","A","path",",","or","a","0-D","`","tf.string","`","tensor","with","path","to","the","asset","."]
code: def _deserialize_from_proto(
      cls, object_proto, export_dir, asset_file_def, **unused_kwargs
  ):
      proto = object_proto.asset
      filename = file_io.join(
          path_helpers.get_assets_dir(export_dir),
          asset_file_def[proto.asset_file_def_index].filename,
      )
      asset = cls(filename)
      if not context.executing_eagerly():
          ops.add_to_collection(
              ops.GraphKeys.ASSET_FILEPATHS, asset.asset_path
          )
      return asset
  
file_path: tensorflow-upstream/tensorflow/python/trackable/asset.py
imports: import os
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion_registry
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.saved_model import path_helpers
  from tensorflow.python.trackable import base
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling the Asset obj's underlying member method code with example usage: obj._deserialize_from_proto(cls, object_proto, export_dir, asset_file_def) and returns: asset