code: def add_mask(target: torch.Tensor, target_space: PruningTargetSpace):
      assert target_space.mask is not None
      trans_mask = torch.where(
          target_space.mask == 1,
          torch.zeros_like(target_space.mask),
          SMALL_MASK_VALUE,
      )
      return torch.add(target, trans_mask)
  
imports: from typing import Any
  import torch
  from .target_space import PruningTargetSpace, QuantizationTargetSpace, TargetSpace, TargetType
label_desc: Use image node_id 5 for calling a global function with example usage: add_mask(target, target_space) and returns: torch