code: def test_root_and_output_names() -> None:
      e = pl.col("foo") * pl.col("bar")
      assert e.meta.output_name() == "foo"
      assert e.meta.root_names() == ["foo", "bar"]
  
      e = pl.col("foo").filter(bar=13)
      assert e.meta.output_name() == "foo"
      assert e.meta.root_names() == ["foo", "bar"]
  
      e = pl.sum("foo").over("groups")
      assert e.meta.output_name() == "foo"
      assert e.meta.root_names() == ["foo", "groups"]
  
      e = pl.sum("foo").slice(pl.count() - 10, pl.col("bar"))
      assert e.meta.output_name() == "foo"
      assert e.meta.root_names() == ["foo", "bar"]
  
      e = pl.count()
      assert e.meta.output_name() == "count"
  
      with pytest.raises(
          pl.ComputeError,
          match="cannot determine output column without a context for this expression",
      ):
          pl.all().name.suffix("_").meta.output_name()
  
      assert (
          pl.all()
          .name.suffix("_")
          .meta.output_name(raise_if_undetermined=False)
          is None
      )
  
file_path: polars/py-polars/tests/unit/namespaces/test_meta.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  import pytest
  import polars
label_desc: Use image node_id 2 for calling a global function with example usage: test_root_and_output_names() without return types