def METHOD_NAME(self) -> Optional[str]:
    """Return the topmost parent of this location. It should be
    either a string naming a slot or a None if the location isn't
    associated with a slot"""
    # cycle-detecting recursive climbing
    seen: Set[LabwareLike] = set()
    # internal function to have the cycle detector different per call
    def _fp_recurse(location: LabwareLike):
        if location in seen:
            raise RuntimeError("Cycle in labware parent")
        seen.add(location)
        if location.is_empty:
            return None
        elif location.is_slot:
            return str(location)
        else:
            return location.parent.METHOD_NAME()
    return _fp_recurse(self)