code: def crossover(p1, p2, probs):
      """
      Mate parents (p1, p2) to produce members of the next generation.
      Children are generated by selecting features from either parent.
      Select from p1 with the probabilties in probs.
      """
      u = torch.rand(*p1.shape)
      return torch.where(probs[:, :, None] > u, p1, p2)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from typing import Optional
  from math import inf
  import torch
  import torch.nn.functional
  from advertorch.attacks.base import Attack
  from advertorch.attacks.base import LabelMixin
  from .utils import _check_param, _flatten, _make_projector
label_desc: Use image node_id 3 for calling a global function with example usage: crossover(p1, p2, probs) and returns: torch