<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def contains(this, that, axis=semantics.axis_default):
 """Returns bool for each element of `that`, indicating if it is contained in `this` Parameters this : indexable key sequence sequence of items to test against that : indexable key sequence sequence of items to test for Returns ------- ndarray, [that.size], bool returns a bool for each element in `that`, indicating if it is contained in `this` Notes ----- Reads as 'this contains that' Similar to 'that in this', but with different performance characteristics """

    this = as_index(this, axis=axis, lex_as_struct=True, base=True)
    that = as_index(that, axis=axis, lex_as_struct=True)

    left = np.searchsorted(that._keys, this._keys, sorter=that.sorter, side='left')
    right = np.searchsorted(that._keys, this._keys, sorter=that.sorter, side='right')

    flags = np.zeros(that.size + 1, dtype=np.int)
    np.add.at(flags, left, 1)
    np.add.at(flags, right, -1)

    return np.cumsum(flags)[:-1].astype(np.bool)[that.rank]