docs: def install_plugin(pkgpath, plugin_type, install_path, register_func):
      """Install specified plugin.
  
      :param pkgpath: Name of plugin to be downloaded from online repo or path to plugin folder or zip file.
      :param install_path: Path where plugin will be installed.
      :param register_func: Method used to register and validate plugin.
      """
      service_name = os.path.basename(pkgpath)
      if os.path.exists(os.path.join(install_path, service_name)):
          raise exceptions.PluginAlreadyInstalled(pkgpath)
  
      if os.path.exists(pkgpath):
          logger.debug("%s exists in filesystem", pkgpath)
          if os.path.isdir(pkgpath):
              pip_status = install_dir(pkgpath, install_path, register_func)
          else:  # pkgpath is file
              pip_status = install_from_zip(pkgpath, install_path, register_func)
      else:
          logger.debug("cannot find %s locally, checking github repo", pkgpath)
          click.secho("Collecting {}..".format(pkgpath))
          pip_status = install_from_repo(pkgpath, plugin_type, install_path, register_func)
  
      if pip_status == 0:
          click.secho("[+] Great success!")
      else:
          # TODO: rephrase
          click.secho("[-] Service installed but something was odd with dependency install, please review debug logs")