code: def get_ref_im(colors, crop, isfloat):
      """Get reference image with
      * colors: 0, 1, 3, 4
      * cropping: 0-> none, 1-> crop, 2-> crop with non-contiguous data
      * float: False, True
      """
      assert colors in (0, 1, 3, 4)
      assert crop in (0, 1, 2)
      assert isfloat in (False, True)
      rim = [im0, im1, None, im3, im4][colors]
      if isfloat:
          rim = rim.astype(np.float32) / 255.0
      if crop == 1:
          rim = rim[:-1, :-1].copy()
      elif crop == 2:
          rim = rim[:-1, :-1]
      return rim
  
imports: import os
  import sys
  import io
  from zipfile import ZipFile
  import numpy
  import pytest
  import imageio
  from imageio import core
  from conftest import deprecated_test
label_desc: Use image node_id 2 for calling a global function with example usage: get_ref_im(colors, crop, isfloat) and returns: rim