def path_and_method(select: Select.Lens) -> Tuple[Select.Lens, str]:
        """
        If `select` names in method as the last attribute, extract the method name
        and the selector without the final method name.
        """

        if len(select.path) == 0:
            raise ValueError(
                "Given selector is empty so does not name a method."
            )

        firsts = select.path[:-1]
        last = select.path[-1]

        if not isinstance(last, serial_utils.StepItemOrAttribute):
            raise ValueError(
                "Last part of selector is not an attribute so does not name a method."
            )

        method_name = last.get_item_or_attribute()
        path = Select.Lens(path=firsts)

        return path, method_name

        If `select` names in method as the last attribute, extract the method name
        and the selector without the final method name.
        
src/core/trulens/core/schema/select.py