async def METHOD_NAME(self, target_dir: Path) -> bool:
    """
    Copies this cog/shared_lib to the given directory. This
    will overwrite any files in the target directory.
    :param pathlib.Path target_dir: The installation directory to install to.
    :return: Status of installation
    :rtype: bool
    """
    copy_func: Callable[..., Any]
    if self._location.is_file():
        copy_func = shutil.copy2
    else:
        copy_func = functools.partial(shutil.copytree, dirs_exist_ok=True)
    # noinspection PyBroadException
    try:
        copy_func(src=str(self._location), dst=str(target_dir / self._location.name))
    except:  # noqa: E722
        log.exception("Error occurred when copying path: %s", self._location)
        return False
    return True