code: def test_validate_axis():
      df = DataFrame(pd.DataFrame(np.random.rand(4, 3)))
  
      assert validate_axis(0, df) == 0
      assert validate_axis("index", df) == 0
      assert validate_axis(1, df) == 1
      assert validate_axis("columns", df) == 1
  
      with pytest.raises(ValueError):
          validate_axis("unknown index", df)
  
      with pytest.raises(ValueError):
          validate_axis(object(), df)
  
      with pytest.raises(ValueError):
          validate_axis(-1, df)
  
      with pytest.raises(ValueError):
          validate_axis(2, df)
  
      df2 = df[df[0] < 0.5]  # create unknown shape
      assert validate_axis(0, df2) == 0
  
imports: import operator
  from collections import OrderedDict
  from numbers import Integral
  from typing import List, Dict
  import numpy
  import pandas
  import pytest
  from ...config import option_context
  from ...core import tile
  from ...utils import Timer
  from ..core import IndexValue
  from ..initializer import DataFrame, Series, Index
  from ..utils import decide_dataframe_chunk_sizes, decide_series_chunk_size, split_monotonic_index_min_max, build_split_idx_to_origin_idx, parse_index, filter_index_value, infer_dtypes, infer_index_value, validate_axis, fetch_corner_data, make_dtypes, build_concatenated_rows_frame, merge_index_value, auto_merge_chunks, whether_to_clean_up
label_desc: Use image node_id 11 for calling a global function with example usage: test_validate_axis() without return types