code: def sizeof_python_collection(seq):
      num_items = len(seq)
      num_samples = 10
      if num_items > num_samples:
          if isinstance(seq, (set, frozenset)):
              # As of Python v3.9, it is deprecated to call random.sample() on
              # sets but since sets are unordered anyways we can simply pick
              # the first `num_samples` items.
              samples = itertools.islice(seq, num_samples)
          else:
              samples = random.sample(seq, num_samples)
          return sys.getsizeof(seq) + int(
              num_items / num_samples * sum(map(sizeof, samples))
          )
      else:
          return sys.getsizeof(seq) + sum(map(sizeof, seq))
  
imports: from __future__ import annotations
  import itertools
  import logging
  import random
  import sys
  from array import array
  import importlib_metadata
  from packaging.version import parse
  from dask.utils import Dispatch
label_desc: Use image node_id 5 for calling a global function with example usage: sizeof_python_collection(seq) and returns: unknown, unknown