code: def to_np_tuple(prop: Union[int, Iterable]) -> np.ndarray:
      """Creates a np array of length 2 from a Conv2D property.
  
      E.g., stride=(2, 3) gets converted into np.array([2, 3]), where the
      height_stride = 2 and width_stride = 3. stride=2 gets converted into
      np.array([2, 2]).
      """
      if type(prop) == int:
          return np.ones(2).astype(int) * prop
      elif isinstance(prop, Iterable) and len(prop) == 2:
          return np.array(list(prop)).astype(int)
      elif type(prop) == np.ndarray and prop.size == 2:
          return prop.astype(int)
      else:
          raise TypeError(
              f"prop must be int or iterable of length 2, but is {prop}."
          )
  
imports: import logging
  import warnings
  from collections.abc import Iterable
  from dataclasses import dataclass
  from io import BytesIO
  from typing import Callable, List, Optional, Tuple, Union
  import numpy
  import tifffile
  import torch
  import torchvision.transforms.functional
  from torchvision.io import decode_image, ImageReadMode
  from torchvision.models._api import WeightsEnum
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import CROP_OR_PAD, INTERPOLATE
  from ludwig.encoders.base import Encoder
  from ludwig.utils.fs_utils import get_bytes_obj_from_path
  from ludwig.utils.registry import Registry
label_desc: Use image node_id 19 for calling a global function with example usage: to_np_tuple(prop) and returns: unknown, np, prop