human
Complete this python program:
def _check_input(opens, closes, highs, lows, miss=(-1)):
assistant
#Here is the Python code you requested.

    """Checks that *opens*, *highs*, *lows* and *closes* have the same length.
    NOTE: this code assumes if any value open, high, low, close is
    missing (*-1*) they all are missing
    Parameters
    ax : `Axes`
    an Axes instance to plot to
    opens : sequence
    sequence of opening values
    highs : sequence
    sequence of high values
    lows : sequence
    sequence of low values
    closes : sequence
    sequence of closing values
    miss : int
    identifier of the missing data
    Raises
    ValueError
    if the input sequences don\t have the same length
    """
    def _missing(sequence, miss=(-1)):
        u'Returns    the    index    in    *sequence*    of    the    missing    data,    identified    by\n                                *miss*\n\n                                Parameters\n                                ----------\n                                sequence    :\n                                                sequence    to    evaluate\n                                miss    :\n                                                identifier    of    the    missing    data\n\n                                Returns\n                                -------\n                                where_miss:    numpy.ndarray\n                                                indices    of    the    missing    data\n                                '
        return np.where((np.array(sequence) == miss))[0]
    same_length = (len(opens) == len(highs) == len(lows) == len(closes))
    _missopens = _missing(opens)
    same_missing = ((_missopens == _missing(highs)).all() and (_missopens == _missing(lows)).all() and (_missopens == _missing(closes)).all())
    if (not (same_length and same_missing)):
        msg = u'*opens*,    *highs*,    *lows*    and    *closes*    must    have    the    same    length.    NOTE:    this    code    assumes    if    any    value    open,    high,    low,    close    is    missing    (*-1*)    they    all    must    be    missing.'
        raise ValueError(msg)