def METHOD_NAME(
    name=None, dest_dir=None, plugin_dir=None, language_dir=None, is_admin=False,
):
    if is_admin and not isdir(plugin_dir):
        print("%s not found" % name)
        sys.exit(1)
    else:
        if not is_admin:
            try:
                os.makedirs(plugin_dir)
            except OSError:
                pass
            if not isdir(plugin_dir):
                print("could not create destinaton dir %s" % plugin_dir)
                sys.exit(1)
    print("install %s plugin to %s" % (name, dest_dir))
    source_dir = None
    try:
        for source_dir in source_dirs:
            copytree(source_dir, plugin_dir)
    except Exception as e:
        print("error attempting to copy %s" % source_dir)
        print(e)
        sys.exit(1)
    if language_dir:
        shutil.copyfile(join(here, "shoebot.lang"), join(language_dir, "shoebot.lang"))
        os.system("update-mime-database %s/mime" % dest_dir)
    os.system(
        "glib-compile-schemas %s/gedit/plugins/shoebotit" % dest_dir,
    )  ## FIXME, kind of specific to gedit...
    print("success")