code: def test_json_encoder_pandas():
      dataframe = pd.DataFrame({"a": [1, 2, 3]})
      assert dumps(dataframe) == '{"a":{"0":1,"1":2,"2":3}}'
  
      series = pd.Series([1, 2, 3])
      assert dumps(series) == '{"0":1,"1":2,"2":3}'
  
imports: from __future__ import annotations
  import asyncio
  import json
  import logging
  import typing
  from dataclasses import dataclass
  from functools import partial
  from typing import TYPE_CHECKING
  import attr
  import numpy
  import pandas
  import pydantic
  import pytest
  from bentoml._internal.io_descriptors.json import DefaultJsonEncoder
  from bentoml._internal.utils import LazyLoader
  from bentoml.exceptions import BadInput
  from bentoml.grpc.utils import import_generated_stubs
  from bentoml.io import JSON
label_desc: Use image node_id 5 for calling a global function with example usage: test_json_encoder_pandas() without return types