code: def validate_length_and_type_numpy_array(
      data: np.ndarray, data_name: str, expected_size: int
  ):
      """Validate length of numpy array and type."""
      if not isinstance(data, np.ndarray):
          raise DeepchecksValueError(
              f"{data_name} type {type(data)} is not supported, "
              "must be a numpy array"
          )
  
      if len(data) != expected_size:
          raise DeepchecksValueError(
              f"received {data_name} with {len(data)} rows, "
              f"expected {expected_size}"
          )
  
imports: import collections
  from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional, Sequence, Set, Tuple, Type, cast
  import numpy
  import pandas
  from deepchecks.core.errors import DeepchecksValueError, ValidationError
  from deepchecks.nlp.task_type import TaskType, TTextLabel
  from deepchecks.utils.logger import get_logger
  from deepchecks.utils.metrics import is_label_none
  from deepchecks.utils.type_inference import infer_categorical_features, infer_numerical_features
  from deepchecks.utils.validation import is_sequence_not_str
label_desc: Use image node_id 5 for calling a global function with example usage: validate_length_and_type_numpy_array(data, data_name, expected_size) without return types