def METHOD_NAME(self, some_string):
    # maybe "foo/bar" is some group's path
    try:
        # try with exact case
        return self.get_group(some_string)
    except NotFoundException:
        # try case insensitive
        groups = self._make_requests_to_api(
            "groups?search=%s",
            some_string.lower(),
            method="GET",
        )
        for group in groups:
            if group["full_path"].lower() == some_string.lower():
                return group
        raise NotFoundException(
            f"Group/subgroup with path '{some_string}' not found."
        )