code: def test_metric_list():
      assert recall(l_true, l_pred) == 4 / 6
      assert isnan(recall(l0, l_pred))
      assert precision(l_true, l_pred) == 4 / 7
      assert recall(l_true, l_pred, thresh=1) == 3 / 6
      assert precision(l_true, l_pred, thresh=1) == 3 / 7
      assert iou(l_true, l_pred) == 3 / 13
      assert isnan(iou(l0, l0))
  
file_path: adtk/tests/test_metric.py
imports: from math import isnan
  import pandas
  import pytest
  from pandas import Timestamp
  from adtk.metrics import f1_score, iou, precision, recall
label_desc: Use image node_id 2 for calling a global function with example usage: test_metric_list() without return types