code: def test_is_in_series() -> None:
      s = pl.Series(["a", "b", "c"])
  
      out = s.is_in(["a", "b"])
      assert out.to_list() == [True, True, False]
  
      # Check if empty list is converted to pl.String
      out = s.is_in([])
      assert out.to_list() == [False] * out.len()
  
      for x_y_z in (["x", "y", "z"], {"x", "y", "z"}):
          out = s.is_in(x_y_z)
          assert out.to_list() == [False, False, False]
  
      df = pl.DataFrame({"a": [1.0, 2.0], "b": [1, 4], "c": ["e", "d"]})
      assert df.select(
          pl.col("a").is_in(pl.col("b"))
      ).to_series().to_list() == [
          True,
          False,
      ]
      assert (
          df.select(pl.col("b").is_in([])).to_series().to_list()
          == [False] * df.height
      )
  
      with pytest.raises(
          pl.InvalidOperationError,
          match=r"`is_in` cannot check for String values in Int64 data",
      ):
          df.select(pl.col("b").is_in(["x", "x"]))
  
      # check we don't shallow-copy and accidentally modify 'a' (see: #10072)
      a = pl.Series("a", [1, 2])
      b = pl.Series("b", [1, 3]).is_in(a)
  
      assert a.name == "a"
      assert_series_equal(b, pl.Series("b", [True, False]))
  
imports: from __future__ import annotations
  from datetime import date
  import pytest
  import polars
  from polars import StringCache
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 11 for calling a global function with example usage: test_is_in_series() without return types