code: def disallow_nanoseconds(freq: Union[str, DateOffset]) -> None:
      if freq in ["N", "ns"]:
          raise ValueError("nanoseconds is not supported")
  
imports: import datetime
  import warnings
  from functools import partial
  from typing import Any, Optional, Union, cast, no_type_check
  import pandas
  from pandas.api.types import is_hashable
  from pandas.tseries.offsets import DateOffset
  from pyspark._globals import _NoValue
  from pyspark import pandas
  from pyspark.pandas import DataFrame
  from pyspark.pandas.indexes.base import Index
  from pyspark.pandas.missing.indexes import MissingPandasLikeDatetimeIndex
  from pyspark.pandas.series import Series, first_series
  from pyspark.pandas.utils import verify_temp_column_name
label_desc: Use image node_id 1 for calling a global function with example usage: disallow_nanoseconds(freq) without return types