code: def is_package(name):
      """Check if name maps to a package installed via pip.
  
      Args:
          name (str): Name of package
  
      Returns:
          bool: True if an installed packaged corresponds to this name, False
              otherwise.
      """
      import pkg_resources
  
      name = name.lower().replace("-", "_")
      packages = pkg_resources.working_set.by_key.keys()
      for package in packages:
          if package.lower().replace("-", "_") == name:
              return True
      return False
  
imports: from __future__ import unicode_literals
  import importlib
  import json
  import numbers
  import re
  from builtins import bytes, str
  from datetime import datetime
  from functools import wraps
  from pathlib import Path
  from future.utils import text_type
  from snips_nlu.constants import END, ENTITY_KIND, RES_MATCH_RANGE, RES_VALUE, START
  from snips_nlu.exceptions import NotTrained, PersistingError
label_desc: Use image node_id 10 for calling a global function with example usage: is_package(name) and returns: False, True