Find the disk locations of the given named modules, printing the
    discovered paths to stdout and errors discovering paths to stderr.

    Any provided keyword arguments are passed to `identify_filepath()`.

def identify_modules(*args, **kwargs):
    """Find the disk locations of the given named modules, printing the
    discovered paths to stdout and errors discovering paths to stderr.

    Any provided keyword arguments are passed to `identify_filepath()`.

    """
    if len(args) == 1:
        path_template = "%(file)s"
        error_template = "Module '%(mod)s' not found (%(error)s)"
    else:
        path_template = "%(mod)s: %(file)s"
        error_template = "%(mod)s: not found (%(error)s)"

    for modulename in args:
        try:
            filepath = identify_filepath(modulename, **kwargs)
        except ModuleNotFound:
            exc = sys.exc_info()[1]
            sys.stderr.write(error_template % {
                'mod': modulename,
                'error': str(exc),
            })
            sys.stderr.write('\n')
        else:
            print(path_template % {
                'mod': modulename,
                'file': filepath
            })