code: def function_digest(function):
      """Returns a string that is stable across multiple invocations across
      multiple processes and is prone to changing significantly in response to
      minor changes to the function.
  
      No guarantee of uniqueness though it usually will be.
      """
      hasher = hashlib.sha384()
      try:
          hasher.update(
              to_unicode(inspect.getsource(function)).encode("utf-8")
          )
      # Different errors on different versions of python. What fun.
      except (OSError, IOError, TypeError):
          pass
      try:
          hasher.update(str_to_bytes(function.__name__))
      except AttributeError:
          pass
      try:
          hasher.update(function.__module__.__name__.encode("utf-8"))
      except AttributeError:
          pass
      try:
          hasher.update(str_to_bytes(repr(getfullargspec(function))))
      except TypeError:
          pass
      try:
          hasher.update(function._hypothesis_internal_add_digest)
      except AttributeError:
          pass
      return hasher.digest()
  
imports: from __future__ import absolute_import, division, print_function
  import ast
  import hashlib
  import inspect
  import re
  import types
  from functools import wraps
  from types import ModuleType
  from hypothesis.internal.compat import ARG_NAME_ATTRIBUTE, PY2, getfullargspec, hrange, isidentifier, qualname, str_to_bytes, to_str, to_unicode, update_code_location
  from hypothesis.vendor.pretty import pretty
label_desc: Use image node_id 3 for calling a global function with example usage: function_digest(function) and returns: hasher