code: def attach(q, stxnode):
      if q:
          try:
              q.startchar = stxnode.startchar
              q.endchar = stxnode.endchar
          except AttributeError:
              raise AttributeError(
                  "Can't set attribute on %s" % q.__class__.__name__
              )
      return q
  
imports: import sys
label_desc: Use image node_id 2 for calling a global function with example usage: attach(q, stxnode) and returns: q