<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_ia_module(cmd):
 """Dynamically import ia module."""

    try:
        if cmd in list(cmd_aliases.keys()) + list(cmd_aliases.values()):
            _module = 'internetarchive.cli.ia_{0}'.format(cmd)
            return __import__(_module, fromlist=['internetarchive.cli'])
        else:
            _module = 'ia_{0}'.format(cmd)
            for ep in iter_entry_points('internetarchive.cli.plugins'):
                if ep.name == _module:
                    return ep.load()
            raise ImportError
    except (ImportError, DistributionNotFound):
        print("error: '{0}' is not an ia command! See 'ia help'".format(cmd),
              file=sys.stderr)
        matches = '\t'.join(difflib.get_close_matches(cmd, cmd_aliases.values()))
        if matches:
            print('\nDid you mean one of these?\n\t{0}'.format(matches))
        sys.exit(127)