code: def tests_accepts_timedelta_with_pandas(self):
      class Foo(HasProps):
          dt = bcpd.NumberSpec("dt", accept_datetime=True)
          ndt = bcpd.NumberSpec("ndt", accept_datetime=False)
  
      f = Foo()
  
      # counts as number.Real out of the box
      f.dt = pd.Timedelta("3000ms")
      assert f.dt == 3000.0
  
      f.ndt = pd.Timedelta("3000ms")
      assert f.ndt == 3000.0
  
imports: from __future__ import annotations
  import pytest
  import datetime
  import warnings
  from copy import copy
  import numpy
  import pandas
  from bokeh.core.has_props import HasProps, Local
  from bokeh.core.property.vectorization import Field, Value, field, value
  from tests.support.util.api import verify_all
  import bokeh.core.property.dataspec
label_desc: Use image node_id 4 for calling the Test_NumberSpec obj's underlying member method code with example usage: obj.tests_accepts_timedelta_with_pandas() without return types