code: def test_series_format():
      s = pd.Series([1, 2, 3, 4, 5, 6, 7, 8], index=list("ABCDEFGH"))
      ds = dd.from_pandas(s, 3)
      footer = _format_footer()
      exp = dedent(
          f"""\
      Dask Series Structure:
      npartitions=3
      A    int64
      D      ...
      G      ...
      H      ...
      dtype: int64
      {footer}"""
      )
      assert repr(ds) == exp
      assert str(ds) == exp
  
      exp = dedent(
          """\
      npartitions=3
      A    int64
      D      ...
      G      ...
      H      ..."""
      )
      assert ds.to_string() == exp
  
      s = pd.Series(
          [1, 2, 3, 4, 5, 6, 7, 8], index=list("ABCDEFGH"), name="XXX"
      )
      ds = dd.from_pandas(s, 3)
      exp = dedent(
          f"""\
      Dask Series Structure:
      npartitions=3
      A    int64
      D      ...
      G      ...
      H      ...
      Name: XXX, dtype: int64
      {footer}"""
      )
      assert repr(ds) == exp
      assert str(ds) == exp
  
imports: from __future__ import annotations
  from textwrap import dedent
  import numpy
  import pandas
  import pytest
  import dask.array
  import dask.dataframe
  from dask.dataframe.utils import get_string_dtype, pyarrow_strings_enabled
  from dask.utils import maybe_pluralize
label_desc: Use image node_id 9 for calling a global function with example usage: test_series_format() without return types