code: def copy_attributes(
      info_add, obj, name_fmt, attributes, *, formatter=None
  ):
      for attr in attributes:
          value = getattr(obj, attr, None)
          if value is None:
              continue
          name = name_fmt % attr
          if formatter is not None:
              value = formatter(attr, value)
          info_add(name, value)
  
imports: import errno
  import re
  import sys
  import traceback
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: copy_attributes(info_add, obj, name_fmt, attributes) without return types