def METHOD_NAME(self):
    with self.subTest(
        "No project_check_enabled /some/random/path not in root_path"
    ):
        state.settings.configuration["project_check_enabled"] = False
        path = "/some/random/path"
        root_path, pr_path = self.project_path._get_project_from_path(path)
        self.assertIs(root_path, None)
        self.assertEqual(pr_path, path)
    with self.subTest("project_check_enabled /some/random/path not in root_path"):
        state.settings.configuration["project_check_enabled"] = True
        path = "/some/random/path"
        self.assertRaises(
            ValueError, self.project_path._get_project_from_path, path
        )
    with self.subTest("No project_check_enabled /some/random/path in root_path"):
        state.settings.configuration["project_check_enabled"] = False
        state.settings.configuration["project_paths"] = ["/some"]
        path = "/some/random/path"
        root_path, pr_path = self.project_path._get_project_from_path(path)
        self.assertEqual(root_path, "/some")
        self.assertEqual(pr_path, "random/path")
    with self.subTest("project_check_enabled /some/random/path in root_path"):
        state.settings.configuration["project_check_enabled"] = True
        path = "/some/random/path"
        root_path, pr_path = self.project_path._get_project_from_path(path)
        self.assertEqual(root_path, "/some")
        self.assertEqual(pr_path, "random/path")