code: def _sqrt_positive_part(x: torch.Tensor) -> torch.Tensor:
      """
      Returns torch.sqrt(torch.max(0, x))
      but with a zero subgradient where x is 0.
      """
      ret = torch.zeros_like(x)
      positive_mask = x > 0
      ret[positive_mask] = torch.sqrt(x[positive_mask])
      return ret
  
imports: from typing import Optional
  import torch
  import torch.nn.functional
  from ..common.datatypes import Device
label_desc: Use image node_id 3 for calling a global function with example usage: _sqrt_positive_part(x) and returns: ret