code: def _draw_box(im, x1, y1, x2, y2, r, g, b):
      y1 = int(y1)
      y2 = int(y2)
      x1 = int(x1)
      x2 = int(x2)
      ac, ah, aw = im.shape
      if x1 < 0:
          x1 = 0
      if x1 >= aw:
          y1 = 0
      if y1 >= ah:
          y1 = ah - 1
      if y2 < 0:
          y2 = 0
      if y2 >= ah:
          y2 = ah - 1
  
      for i in range(x1, x2):
          im[0][y1][i] = r
          im[0][y2][i] = r
          im[1][y1][i] = g
          im[1][y2][i] = g
          im[2][y1][i] = b
          im[2][y2][i] = b
  
      for i in range(y1, y2):
          im[0][i][x1] = r
          im[0][i][x2] = r
          im[1][i][x1] = g
          im[1][i][x2] = g
          im[2][i][x1] = b
          im[2][i][x2] = b
  
imports: from __future__ import division
  import math
  from collections import namedtuple
  from functools import cmp_to_key
  import numpy
label_desc: Use image node_id 20 for calling a global function with example usage: _draw_box(im, x1, y1, x2, y2, r, g, b) without return types