code: def _make_key(func,
                args,
                kwds,
                typed,
                kwd_mark=(object(), ),
                fasttypes={int, str, frozenset, type(None)},
                sorted=sorted,
                tuple=tuple,
                type=type,
                len=len):
      'Make a cache key from optionally typed positional and keyword arguments'
      key = args
      key += kwd_mark
      key += ('__func__', func)
      if kwds:
          sorted_items = sorted(kwds.items())
          for item in sorted_items:
              key += item
      if typed:
          key += tuple(type(v) for v in args)
          if kwds:
              key += tuple(type(v) for k, v in sorted_items)
      elif len(key) == 1 and type(key[0]) in fasttypes:
          return key[0]
      return _HashedSeq(keyf _make_key(func,
                args,
                kwds,
                typed,
                kwd_mark=(object(), ),
                fasttypes={int, str, frozenset, type(None)},
                sorted=sorted,
                tuple=tuple,
                type=type,
                len=len):
      'Make a cache key from optionally typed positional and keyword arguments'
      key = args
      key += kwd_mark
      key += ('__func__', func)
      if kwds:
          sorted_items = sorted(kwds.items())
          for item in sorted_items:
              key += item
      if typed:
          key += tuple(type(v) for v in args)
          if kwds:
              key += tuple(type(v) for k, v in sorted_items)
      elif len(key) == 1 and type(key[0]) in fasttypes:
          return key[0]
      return _HashedSeq(key)
docs: Make a cache key from optionally typed positional and keyword arguments