code: def _flatten(x, f):
      if isinstance(x, str):
          f.write("%ds%s" % (len(x), x))
      elif isinstance(x, dict):
          keys = sorted(x.keys())
          f.write("%dd" % len(keys))
          for key in keys:
              _flatten(key, f)
              _flatten(x[key], f)
      elif isinstance(x, (list, tuple)):
          f.write("%dl" % len(x))
          for value in x:
              _flatten(value, f)
      elif isinstance(x, int_or_long):
          f.write("%di" % (x,))
      else:
          raise TypeError(
              "the keywords to verify() contains unsupported object %r"
              % (x,)
          )
  
file_path: catboost/contrib/python/cffi/py3/cffi/ffiplatform.py
imports: import sys, os
  from .error import VerificationError
label_desc: Use image node_id 5 for calling a global function with example usage: _flatten(x, f) without return types