code: def test_series_regular(x):
      # regular Series
      s = x[0].copy()
      sv = validate_series(s, check_categorical=True)
      if isinstance(sv, pd.Series):
          pd.testing.assert_series_equal(sv, x[1], check_dtype=False)
      elif isinstance(sv, pd.DataFrame):
          pd.testing.assert_frame_equal(sv, x[1], check_dtype=False)
      else:
          raise TypeError("Must be pandas Series or DataFrame")
      # check if copy instead of view
      sc = s.copy()
      sv.iloc[0] == 1000
      if isinstance(s, pd.Series):
          pd.testing.assert_series_equal(s, sc, check_dtype=False)
      elif isinstance(s, pd.DataFrame):
          pd.testing.assert_frame_equal(s, sc, check_dtype=False)
      else:
          raise TypeError("Must be pandas Series or DataFrame")
  
file_path: adtk/tests/test_data_validation.py
imports: import numpy
  import pandas
  import pytest
  from adtk.data import validate_series
label_desc: Use image node_id 1 for calling a global function with example usage: test_series_regular(x) without return types