class_docstr: A function cache based on unbound function objects.
  
  Using the function for the cache key allows efficient handling of object
  methods.
  
  Unlike the _CodeObjectCache, this discriminates between different functions
  even if they have the same code. This is needed for decorators that may
  masquerade as another function.
class_docstr_tok: ["A","function","cache","based","on","unbound","function","objects",".","Using","the","function","for","the","cache","key","allows","efficient","handling","of","object","methods",".","Unlike","the","_CodeObjectCache",",","this","discriminates","between","different","functions","even","if","they","have","the","same","code",".","This","is","needed","for","decorators","that","may","masquerade","as","another","function","."]
code: def _get_key(self, entity):
      if inspect.ismethod(entity):
          return entity.__func__
      return entity
  
file_path: tensorflow-upstream/tensorflow/python/autograph/pyct/cache.py
imports: import inspect
  import weakref
label_desc: Use image node_id 1 for calling the UnboundInstanceCache obj's underlying member method code with example usage: obj._get_key(entity) and returns: entity, entity