code: def _print_attrs(obj, keys, file):
      max_len = max(len(key) for key in keys)
      for key in keys:
          spacer = " " * (max_len - len(key))
          file.write("{} {}{}\n".format(key, spacer, getattr(obj, key)))
  
imports: import sys
  import threading
  import typing
  from chainer import types
label_desc: Use image node_id 1 for calling a global function with example usage: _print_attrs(obj, keys, file) without return types