code: def _disallow_nanoseconds(self, f):
      self.assertRaises(ValueError, lambda: f(freq="ns"))
      self.assertRaises(ValueError, lambda: f(freq="N"))
  
imports: import pandas
  import pyspark.pandas
  from pyspark.testing.pandasutils import PandasOnSparkTestCase, TestUtils
label_desc: Use image node_id 6 for calling the DatetimeIndexTestingFuncMixin obj's underlying member method code with example usage: obj._disallow_nanoseconds(f) without return types