parameters: (file_name)
docstring: Imports the file as <parent dir>.<file name without ".py">. Raises
      exceptions if fails.
      :param file_name: The path to import.
      :return: The loaded module.
docstring_summary: Imports the file as <parent dir>.<file name without ".py">. Raises
      exceptions if fails.
      :param file_name: The path to import.
      :return: The loaded module.
docstring_tokens: Imports the file as <parent dir > . <file name without . py > . Raises exceptions if fails . : param file_name : The path to import . : return : The loaded module .
function: def import_file_as_package(file_name):
      """
      Imports the file as <parent dir>.<file name without ".py">. Raises
      exceptions if fails.
      :param file_name: The path to import.
      :return: The loaded module.
      """
      package_name, module_name = get_file_package_and_module(
          file_name)
      sys.path.insert(0, os.path.dirname(os.path.dirname(file_name)))
      try:
          return import_module("%s.%s" % (package_name, module_name))
      finally:
          del sys.path[0]
function_tokens: def import_file_as_package ( file_name ) : package_name , module_name = get_file_package_and_module ( file_name ) sys . path . insert ( 0 , os . path . dirname ( os . path . dirname ( file_name ) ) ) try : return import_module ( "%s.%s" % ( package_name , module_name ) ) finally : del sys . path [ 0 ]