code: def assert_padded_array(
      sampled_array: np.array,
      reference_array: np.array,
      padding_array: np.array,
  ):
      num_padded = int(np.sum(padding_array))
      sampled_no_padding = sampled_array[:, num_padded:]
  
      reference_array = np.roll(reference_array, num_padded, axis=1)
      reference_no_padding = reference_array[:, num_padded:]
  
      # Convert nans to dummy value for assertion because
      # np.nan == np.nan -> False.
      reference_no_padding[np.isnan(reference_no_padding)] = 9999.0
      sampled_no_padding[np.isnan(sampled_no_padding)] = 9999.0
  
      reference_no_padding = np.array(
          reference_no_padding, dtype=np.float32
      )
  
      assert (sampled_no_padding == reference_no_padding).all(), (
          f"Sampled and reference arrays do not match. '"
          f"Got {sampled_no_padding} but should be {reference_no_padding}."
      )
  
imports: from typing import Tuple, List
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  import pytest
  import gluonts
  from gluonts import time_feature, transform
  from gluonts.core import fqname_for
  from gluonts.core.serde import dump_json, load_json
  from gluonts.dataset.common import DataEntry, ListDataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.stat import ScaleHistogram, calculate_dataset_statistics
  from gluonts.transform import CausalMeanValueImputation, DummyValueImputation, LastValueImputation, MeanValueImputation, RollingMeanValueImputation, Valmap
  from gluonts.transform.convert import ToIntervalSizeFormat, erf, erfinv
  from gluonts.transform.feature import CountTrailingZeros
label_desc: Use image node_id 27 for calling a global function with example usage: assert_padded_array(sampled_array, reference_array, padding_array) without return types