code: def functional_to_out_signature(
      func: FunctionSchema,
  ) -> FunctionSchema:
      # Generating an out= schema from a functional schema.
      assert func.kind() == SchemaKind.functional
  
      new_returns, new_out_args = generate_out_args_from_schema(func)
      # The new out= schema has:
      # - one or more new out argument(s) with the same type as returns (but with a mutable annotation)
      # - The returns now alias the out= arguments
      # - an "_out" overload name
      return FunctionSchema(
          name=func.name.with_overload(
              get_expected_out_variant_overload_name(
                  func.name.overload_name
              )
          ),
          arguments=func.arguments.signature().with_out_args(
              new_out_args,
          ),
          returns=tuple(new_returns),
      )
  
file_path: pytorch/torchgen/native_function_generation.py
imports: from collections import defaultdict
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  import torchgen.api.dispatcher
  from torchgen.api.translate import translate
  from torchgen.api.types import Binding, DispatcherSignature, Expr
  from torchgen.context import with_native_function
  from torchgen.model import Annotation, Argument, BackendIndex, BackendMetadata, BaseOperatorName, BaseTy, BaseType, DEFAULT_KERNEL_NAMESPACE, DeviceCheckType, DispatchKey, FunctionSchema, NativeFunction, NativeFunctionsGroup, OperatorName, Return, SchemaKind, Variant
  from torchgen.utils import concatMap
label_desc: Use image node_id 4 for calling a global function with example usage: functional_to_out_signature(func) and returns: FunctionSchema