<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_source(name, pathname):
 """ This function provides the backward compatibility for 'imp.load_source' in Python 2. :param name: Name used to create or access a module object. :param pathname: Path pointing to the source file. :return: Loaded and initialized module. """

    if six.PY2:
        import imp
        return imp.load_source(name, pathname)
    else:
        loader = importlib.machinery.SourceFileLoader(name, pathname)
        return loader.load_module(name)