code: def from_pairs(
      cls,
      functional: PythonSignatureNativeFunctionPair,
      out: Optional[PythonSignatureNativeFunctionPair],
  ) -> "PythonSignatureGroup":
      if out is None:
          return PythonSignatureGroup(
              signature=functional.signature,
              base=functional.function,
              outplace=None,
          )
  
      # prefer the signature with optional out=... arguments because it's the
      # superset that can be used to parse input for both base and outplace.
      signature_kwargs = out.signature.__dict__.copy()
  
      # Out overloads in C++ don't have TensorOptions arguments,
      # so take these from the functional variant
      signature_kwargs[
          "tensor_options_args"
      ] = functional.signature.tensor_options_args
  
      return PythonSignatureGroup(
          signature=type(out.signature)(**signature_kwargs),
          base=functional.function,
          outplace=out.function,
      )
  
imports: from dataclasses import dataclass
  from typing import Dict, List, Optional, Sequence, Set, Tuple, Union
  from torchgen.api import cpp
  from torchgen.api.types import Binding, CppSignature, CppSignatureGroup
  from torchgen.gen import pythonify_default
  from torchgen.model import Argument, BaseTy, BaseType, FunctionSchema, ListType, NativeFunction, OptionalType, Return, Type, Variant
label_desc: Use image node_id 1 for calling the PythonSignatureGroup obj's underlying member method code with example usage: obj.from_pairs(cls, functional, out) and returns: PythonSignatureGroup, PythonSignatureGroup