def load_module(full_path):
from importlib import util<EOL>file_name = full_path.replace('<STR_LIT:\\>', '<STR_LIT:/>').split('<STR_LIT:/>')[-<NUM_LIT:1>]<EOL>if file_name[-<NUM_LIT:3>:] != '<STR_LIT>':<EOL><INDENT>raise ImportError(f'<STR_LIT>')<EOL><DEDENT>module_name = file_name[:-<NUM_LIT:3>]<EOL>spec = util.spec_from_file_location(name=module_name, location=full_path)<EOL>module = util.module_from_spec(spec=spec)<EOL>spec.loader.exec_module(module=module)<EOL>return module<EOL>
Load module from full path
Args:
    full_path: module full path name
Returns:
    python module
References:
    https://stackoverflow.com/a/67692/1332656
Examples:
    >>> import os
    >>>
    >>> cur_file = os.path.abspath(__file__).replace('\\\\', '/')
    >>> cur_path = '/'.join(cur_file.split('/')[:-1])
    >>> load_module(f'{cur_path}/timezone.py').__name__
    'timezone'
    >>> load_module(f'{cur_path}/timezone.pyc')
    Traceback (most recent call last):
    ImportError: not a python file: timezone.pyc