code: def series_isin(elements, values):
      """
      Whether elements in Series are contained in `values`.
  
      Return a boolean Series showing whether each element in the Series
      matches an element in the passed sequence of `values` exactly.
  
      Parameters
      ----------
      values : set or list-like
          The sequence of values to test. Passing in a single string will
          raise a ``TypeError``. Instead, turn a single string into a
          list of one element.
  
      Returns
      -------
      Series
          Series of booleans indicating if each element is in values.
  
      Raises
      ------
      TypeError
        * If `values` is a string
  
      See Also
      --------
      DataFrame.isin : Equivalent method on DataFrame.
  
      Examples
      --------
      >>> import mars.dataframe as md
      >>> s = md.Series(['lame', 'cow', 'lame', 'beetle', 'lame',
      ...                'hippo'], name='animal')
      >>> s.isin(['cow', 'lame']).execute()
      0     True
      1     True
      2     True
      3    False
      4     True
      5    False
      Name: animal, dtype: bool
  
      Passing a single string as ``s.isin('lame')`` will raise an error. Use
      a list of one element instead:
  
      >>> s.isin(['lame']).execute()
      0     True
      1    False
      2     True
      3    False
      4     True
      5    False
      Name: animal, dtype: bool
      """
      if is_list_like(values):
          values = list(values)
      elif not isinstance(
          values, (SERIES_TYPE, TENSOR_TYPE, INDEX_TYPE)
      ):
          raise TypeError(
              "only list-like objects are allowed to be passed to isin(), "
              f"you passed a [{type(values)}]"
          )
      op = DataFrameIsin(values=values)
      return op(elements)
  
imports: import itertools
  import numpy
  import pandas
  from pandas.api.types import is_list_like
  from ...None import opcodes
  from ...core import ENTITY_TYPE
  from ...serialization.serializables import KeyField, AnyField
  from ...tensor.core import TENSOR_TYPE
  from ..core import DATAFRAME_TYPE, SERIES_TYPE, INDEX_TYPE, OutputType
  from ..operands import DataFrameOperand, DataFrameOperandMixin
  from .drop_duplicates import DataFrameDropDuplicates
label_desc: Use image node_id 1 for calling a global function with example usage: series_isin(elements, values) and returns: op