def METHOD_NAME(self, path: str) -> bool:
    if not self.is_enabled():
        return False
    path = os.path.abspath(path)
    assert self.linuxbrew_dir is not None
    assert self.linuxbrew_link_target is not None
    return (path.startswith(self.linuxbrew_dir + '/') or
            path.startswith(self.linuxbrew_link_target + '/'))