Get :class:`PathCall` from `neighbour` and `element`.

    Args:
        neigh_type (str): `left` for left neighbour, `right` for .. This is
                          used to determine :attr:`PathCall.call_type` of
                          returned object.
        neighbour (obj): Reference to `neighbour` object.
        element (obj): Reference to HTMLElement holding required data.

    Returns:
        obj: :class:`PathCall` instance with data necessary to find `element` \
             by comparing its `neighbour`.

def _neighbour_to_path_call(neig_type, neighbour, element):
    """
    Get :class:`PathCall` from `neighbour` and `element`.

    Args:
        neigh_type (str): `left` for left neighbour, `right` for .. This is
                          used to determine :attr:`PathCall.call_type` of
                          returned object.
        neighbour (obj): Reference to `neighbour` object.
        element (obj): Reference to HTMLElement holding required data.

    Returns:
        obj: :class:`PathCall` instance with data necessary to find `element` \
             by comparing its `neighbour`.
    """
    params = [None, None, neighbour.getContent().strip()]

    if neighbour.isTag():
        params = [
            neighbour.getTagName(),
            _params_or_none(neighbour.params),
            neighbour.getContent().strip()
        ]

    return PathCall(
        neig_type + "_neighbour_tag",
        0,  # TODO: Dynamic lookup
        NeighCall(element.getTagName(), _params_or_none(element.params), params)
    )