code: def _is_import_err_msg(err_str, module):
      parts = module.split(".")
      suffixes = [".".join(parts[i:]) for i in range(len(parts))]
      prefixes = [".".join(parts[:i]) for i in range(len(parts))]
      return err_str in (
          ["No module named %s" % suffix for suffix in suffixes]
          + ["No module named '%s'" % suffix for suffix in suffixes]
          + ["No module named %s" % prefix for prefix in prefixes]
          + ["No module named '%s'" % prefix for prefix in prefixes]
      )
  
file_path: tensor2tensor/tensor2tensor/data_generators/all_problems.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import importlib
  import six
  from six.moves import range
label_desc: Use image node_id 1 for calling a global function with example usage: _is_import_err_msg(err_str, module) and returns: unknown