code: def random_crop(img):
      """Get random block of img, which size is 100x100."""
      img = Image.open(img)
      w, h = img.size
      random_w = np.random.randint(0, w - 100)
      random_h = np.random.randint(0, h - 100)
      r = img.crop((random_w, random_h, random_w + 100, random_h + 100))
      return np.asarray(r)
  
imports: import numpy
  from PIL import Image
  from visualdl import LogWriter
label_desc: Use image node_id 1 for calling a global function with example usage: random_crop(img) and returns: np