code: def test_encode_customdata_datetime_homogenous_dataframe(self):
      df = pd.DataFrame(
          dict(
              t1=pd.to_datetime(["2010-01-01", "2010-01-02"]),
              t2=pd.to_datetime(["2011-01-01", "2011-01-02"]),
          )
      )
      # 2D customdata
      fig = Figure(
          Scatter(x=df["t1"], customdata=df[["t1", "t2"]]),
          layout=dict(template="none"),
      )
      fig_json = _json.dumps(
          fig,
          cls=utils.PlotlyJSONEncoder,
          separators=(",", ":"),
          sort_keys=True,
      )
      self.assertTrue(
          fig_json.startswith(
              '{"data":[{"customdata":'
              '[["2010-01-01T00:00:00","2011-01-01T00:00:00"],'
              '["2010-01-02T00:00:00","2011-01-02T00:00:00"]'
          )
      )
  
imports: import datetime
  import math
  import decimal
  from datetime import datetime
  from unittest import TestCase
  from time import time
  import pytest
  import numpy
  import pandas
  import pytz
  from pandas.testing import assert_series_equal
  import json
  import os
  import base64
  from plotly import optional_imports, utils
  import plotly.graph_objects
  from plotly.graph_objs import Scatter, Scatter3d, Figure, Data
  from plotly.utils import get_by_path
  from PIL import Image
label_desc: Use image node_id 14 for calling the TestJSONEncoder obj's underlying member method code with example usage: obj.test_encode_customdata_datetime_homogenous_dataframe() without return types