code: def test_column_offset_and_size(pandas_input, offset, size):
      col = cudf.core.column.as_column(pandas_input)
      col = cudf.core.column.build_column(
          data=col.base_data,
          dtype=col.dtype,
          mask=col.base_mask,
          size=size,
          offset=offset,
          children=col.base_children,
      )
  
      if cudf.api.types.is_categorical_dtype(col.dtype):
          assert col.size == col.codes.size
          assert col.size == (
              col.codes.data.size / col.codes.dtype.itemsize
          )
      elif cudf.api.types.is_string_dtype(col.dtype):
          if col.size > 0:
              assert col.size == (col.children[0].size - 1)
              assert col.size == (
                  (
                      col.children[0].data.size
                      / col.children[0].dtype.itemsize
                  )
                  - 1
              )
      else:
          assert col.size == (col.data.size / col.dtype.itemsize)
  
      got = cudf.Series(col)
  
      if offset is None:
          offset = 0
      if size is None:
          size = 100
      else:
          size = size + offset
  
      slicer = slice(offset, size)
      expect = pandas_input.iloc[slicer].reset_index(drop=True)
  
      assert_eq(expect, got)
  
imports: import cupy
  import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf._lib.transform import mask_to_bools
  from cudf.core.column.column import as_column
  from cudf.testing._utils import assert_eq, assert_exceptions_equal
  from cudf.utils import dtypes
label_desc: Use image node_id 3 for calling a global function with example usage: test_column_offset_and_size(pandas_input, offset, size) without return types