class_docstr: Test box_iou and generalized_box_iou functions.
class_docstr_tok: ["Test","box_iou","and","generalized_box_iou","functions","."]
docstr: Returns method_fn function corresponding to method str.
docstr_tok: ["Returns","method_fn","function","corresponding","to","method","str","."]
code: def _get_method_fn(cls, method):
      """Returns method_fn function corresponding to method str."""
      if method == "iou":
          method_fn = lambda x, y, **kwargs: box_utils.box_iou(
              x, y, **kwargs
          )[0]
      elif method == "giou":
          method_fn = box_utils.generalized_box_iou
      else:
          raise ValueError(f"Unknown method {method}")
      return method_fn
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  import jax.numpy
  import numpy
  from scenic.model_lib.base_models import box_utils
  from shapely import geometry
label_desc: Use image node_id 3 for calling the IoUTest obj's underlying member method code with example usage: obj._get_method_fn(cls, method) and returns: method_fn