code: def test_series(self):
      s = pd.Series([1, 2, 3], name="foo")
      result = build_table_schema(s, version=False)
      expected = {
          "fields": [
              {"name": "index", "type": "integer"},
              {"name": "foo", "type": "integer"},
          ],
          "primaryKey": ["index"],
      }
      assert result == expected
      result = build_table_schema(s)
      assert "pandas_version" in result
  
imports: from collections import OrderedDict
  from io import StringIO
  import json
  import numpy
  import pytest
  from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, PeriodDtype
  import pandas
  from pandas import DataFrame
  import pandas._testing
  from pandas.io.json._table_schema import as_json_table_type, build_table_schema, convert_json_field_to_pandas_type, convert_pandas_type_to_json_field, set_default_names
label_desc: Use image node_id 2 for calling the TestBuildSchema obj's underlying member method code with example usage: obj.test_series() without return types