code: def isin(self, test_elements):
          
          from .computation import apply_ufunc
          from .dataset import Dataset
          from .dataarray import DataArray
          from .variable import Variable
  
          if isinstance(test_elements, Dataset):
              raise TypeError(
                  'isin() argument must be convertible to an array: {}'
                  .format(test_elements))
          elif isinstance(test_elements, (Variable, DataArray)):
              # need to explicitly pull out data to support dask arrays as the
              # second argument
              test_elements = test_elements.data
  
          return apply_ufunc(
              duck_array_ops.isin,
              self,
              kwargs=dict(test_elements=test_elements),
              dask='allowed',
          )
docs: Tests each value in the array for whether it is in test elements.
  
          Parameters
          ----------
          test_elements : array_like
              The values against which to test each value of `element`.
              This argument is flattened if an array or array_like.
              See numpy notes for behavior with non-array-like parameters.
  
          Returns
          -------
          isin : same as object, bool
              Has the same shape as this object.
  
          Examples
          --------
  
          >>> array = xr.DataArray([1, 2, 3], dims='x')
          >>> array.isin([1, 3])
          <xarray.DataArray (x: 3)>
          array([ True, False,  True])
          Dimensions without coordinates: x
  
          See also
          --------
          numpy.isin