code: def get_object_package_version(obj):
      """
      Return the top level package name and package version that defines the
      class of the given object.
      """
      try:
          module_name = obj.__class__.__module__
  
          if "." in module_name:
              top_package_name = module_name.split(".")[0]
          else:
              top_package_name = module_name
  
      except AttributeError:
          return None, None
  
      try:
          top_package_version = sys.modules[
              top_package_name
          ].__version__
          return top_package_name, top_package_version
  
      except AttributeError:
          return top_package_name, None
  
imports: import os
  import shutil
  import sys
  import tempfile
  import zlib
  import base64
  from functools import wraps
  from io import BytesIO
  from itertools import takewhile
  import re
  from metaflow.exception import MetaflowUnknownUser, MetaflowInternalError
  from typing import NamedTuple
label_desc: Use image node_id 15 for calling a global function with example usage: get_object_package_version(obj) and returns: top_package_name,  top_package_version, None,  None, top_package_name,  None