code: def test_torch_Precision():
      from bigdl.orca.learn.pytorch.pytorch_metrics import Precision
  
      target = torch.tensor([0, 1, 1, 0, 1, 1])
      preds = torch.tensor([0, 0.2, 1.0, 0.8, 0.6, 0.5])
      precision = Precision()
      precision(preds, target)
      assert precision.compute() - 0.75 < 10e-6
  
file_path: BigDL/python/orca/test/bigdl/orca/learn/test_metrics.py
imports: import torch
  import pytest
label_desc: Use image node_id 16 for calling a global function with example usage: test_torch_Precision() without return types