code: def open_file(path):
      if path.endswith(".gz"):
          return gzip.open(path, "rt", encoding="utf-8")
      else:
          # Find gzipped version of the file
          gz = path + ".gz"
          if os.path.exists(gz):
              return open_file(gz)
          else:
              return io.open(path, encoding="utf-8", errors="ignore")
  
file_path: chainer/examples/chainermn/seq2seq/europal.py
imports: from __future__ import unicode_literals
  import collections
  import gzip
  import io
  import os
  import re
  import numpy
  import progressbar
label_desc: Use image node_id 2 for calling a global function with example usage: open_file(path) and returns: gzip, open_file, io