class_docstr: TorchLoss wraps a loss function for distributed inference or training.
  This TorchLoss should be used with TorchModel.
code: def from_pytorch(criterion):
      bys = CloudPickleSerializer.dumps(
          CloudPickleSerializer, criterion
      )
      net = TorchLoss(bys)
      return net
  
file_path: analytics-zoo/pyzoo/zoo/pipeline/api/torch/torch_loss.py
imports: import sys
  from bigdl.nn.criterion import Criterion
  from pyspark.serializers import CloudPickleSerializer
  from importlib.util import find_spec
label_desc: Use image node_id 2 for calling the TorchLoss obj's underlying member method code with example usage: obj.from_pytorch(criterion) and returns: net