code: def assert_view_op_properties(func: FunctionSchema) -> None:
      def is_alias(a: Argument) -> bool:
          return a.annotation is not None
  
      args = func.arguments.flat_non_out
      # The first argument is a tensor with an alias semantics (annotations)
      assert len(args) > 0 and args[0].type == BaseType(
          BaseTy.Tensor
      ), f"""In the functionalization codegen, we expect the first argument of every view operator to be a tensor,
  but found an argument of type {str(args[0].type)} for operator: {str(func.name)}."""
      # No other arguments have aliasing semantics
      assert is_alias(args[0]) and not any(
          is_alias(a) for a in args[1:]
      ), """In the functionalization codegen, we expect the first argument of every view operator to alias the output.
  View operators with multiple aliasing inputs aren't supported yet. Found an operator that doesn't satisfy this constraint"""
  
imports: from dataclasses import dataclass
  from typing import Callable, List, Optional, Tuple, Union
  from torchgen.api import cpp, dispatcher
  from torchgen.api.translate import translate
  from torchgen.api.types import BaseCType, Binding, CType, DispatcherSignature, FunctionalizationLambda, iTensorListRefT, NativeSignature, tensorListT, tensorT, VectorCType, ViewInverseSignature
  from torchgen.context import method_with_native_function, native_function_manager, with_native_function, with_native_function_and
  from torchgen.model import Argument, BackendIndex, BaseTy, BaseType, FunctionSchema, ListType, NativeFunction, NativeFunctionsGroup, NativeFunctionsViewGroup, Return, SchemaKind, SelfArgument, TensorOptionsArguments
  from torchgen.native_function_generation import INPLACE_OPS_THAT_DONT_GET_GROUPED_PROPERLY, MUTABLE_OPS_THAT_CANNOT_GET_AN_OUT_VARIANT, OUT_OPS_THAT_DONT_GET_GROUPED_PROPERLY
  from torchgen.selective_build.selector import SelectiveBuilder
label_desc: Use image node_id 8 for calling a global function with example usage: assert_view_op_properties(func) and returns: unknown