import re


def _find_sgRNA(guide_sequence, target_sequence, strand):

    """
    Find start, stop position of a sgRNA in a target sequence.

    Parameters:
    -----------
    guide_sequence

    target_sequence

    Returns:
    --------
    start, stop
    """

    guide_span = re.search(guide_sequence, target_sequence).span()
    start, stop = guide_span[0], guide_span[1]

    if strand == "-":
        start, stop = (
            len(target_sequence) - guide_span[0],
            len(target_sequence) - guide_span[1],
        )

    return start, stop, strand