code: def get_batch_metric(value):
      def some_metric_name(y_pred, y_true):
          return torch.FloatTensor([value])
  
      return some_metric_name
  
imports: import os
  import unittest
  from unittest import skipIf
  from unittest.mock import ANY
  import numpy
  import torch
  import torch.nn
  import torchmetrics
  from poutyne import Metric, Model, do_register_metric_class, rename_doubles, unregister_metric_class
label_desc: Use image node_id 1 for calling a global function with example usage: get_batch_metric(value) and returns: some_metric_name, torch