code: def generate_random_arrow_array(
      num_datapoints: int,
      seed: int,
      generate_nulls: bool = True,
      values: Optional[np.ndarray] = None,
  ) -> pa.ChunkedArray:
      generator = np.random.default_rng(seed)
      data = (
          generator.standard_normal(num_datapoints)
          if values is None
          else generator.choice(
              values, size=num_datapoints, replace=True
          )
      )
  
      # Set random nulls
      if generate_nulls:
          indices = generator.choice(
              len(data), size=num_datapoints // 10
          )
          data[indices] = None
  
      # Split data into <=2 random chunks
      split_points = np.sort(
          generator.choice(
              np.arange(1, num_datapoints), 2, replace=False
          )
      )
      split_points = np.concatenate(
          [[0], split_points, [num_datapoints]]
      )
      chunks = [
          data[split_points[i] : split_points[i + 1]]
          for i in range(len(split_points) - 1)
      ]
      chunks = [chunk for chunk in chunks if len(chunk) > 0]
  
      # Turn chunks into array
      return pa.chunked_array([data], type=pa.float32())
  
imports: import filecmp
  from typing import Any, Dict, Optional
  import numpy
  import pyarrow
  import pytest
  import lightgbm
  from .utils import np_assert_array_equal
label_desc: Use image node_id 5 for calling a global function with example usage: generate_random_arrow_array(num_datapoints, seed, generate_nulls, values) and returns: pa