code: def opened(source, filename=None):
      source, filename = resolve(source, filename)
      if isinstance(source, str):
          with open(source) as srcfile:
              yield srcfile, filename
      else:
          yield source, filename
  
imports: import contextlib
  import os.path
label_desc: Use image node_id 5 for calling a global function with example usage: opened(source, filename) without return types