code: def vertices_loss(
      criterion_vertices, pred_vertices, gt_vertices, has_smpl
  ):
      """
      Compute per-vertex loss if vertex annotations are available.
      """
      pred_vertices_with_shape = pred_vertices[has_smpl == 1]
      gt_vertices_with_shape = gt_vertices[has_smpl == 1]
      if len(gt_vertices_with_shape) > 0:
          return criterion_vertices(
              pred_vertices_with_shape, gt_vertices_with_shape
          )
      else:
          return paddle.to_tensor([1.0]).fill_(0.0)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from itertools import cycle, islice
  from collections import abc
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register, serializable
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 12 for calling a global function with example usage: vertices_loss(criterion_vertices, pred_vertices, gt_vertices, has_smpl) and returns: criterion_vertices, paddle