code: def get_pixel_value_2d(inp, b, c, h, w, H, W):
      if (h >= 0 and h < H) and (w >= 0 and w < W):
          return inp[b, c, h, w]
      else:
          return 0.0
  
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import list_context
  from refs import generate_transformation_2d, generate_transformation_3d, affine_grid_2d, affine_grid_3d, ChannelLastToFirstTranspose
  from itertools import product
label_desc: Use image node_id 7 for calling a global function with example usage: get_pixel_value_2d(inp, b, c, h, w, H, W) and returns: inp, int