def crossing_finder(path, interface):
    """Find the crossing to an interfaces.

    Method to select the crosses of a path over an interface.

    Parameters
    -----------
    path : object like :py:class:`.PathBase`
        This is the input path which will be trimmed.
    interface : float
        This is the position of the interface.

    Returns
    -------
    ph1, ph2 : lists of snapshots
        It is a list of snapshots to define the crossing,
        one right before and one right after the interface.

    """
    ph1, ph2 = [], []
    for i in range(len(path.phasepoints[:-1])):
        op1 = path.phasepoints[i].order[0]
        op2 = path.phasepoints[i + 1].order[0]
        if op2 >= interface > op1 or op1 >= interface > op2:
            ph1.append(path.phasepoints[i])
            ph2.append(path.phasepoints[i + 1])
    return ph1, ph2
