code: def new(
              name: str,
              arity: Arity,
              class_name: str=None,
              *,
              associative: bool=False,
              commutative: bool=False,
              one_identity: bool=False,
              infix: bool=False
      ) -> Type['Operation']:
          
          class_name = class_name or name
          if not class_name.isidentifier() or keyword.iskeyword(class_name):
              raise ValueError("Invalid identifier for new operator class.")
  
          return type(
              class_name, (Operation, ), {
                  'name': name,
                  'arity': arity,
                  'associative': associative,
                  'commutative': commutative,
                  'one_identity': one_identity,
                  'infix': infix
              }
          )
docs: Utility method to create a new operation type.
  
          Example:
  
          >>> Times = Operation.new('*', Arity.polyadic, 'Times', associative=True, commutative=True, one_identity=True)
          >>> Times
          Times['*', Arity(min_count=2, fixed_size=False), associative, commutative, one_identity]
          >>> str(Times(Symbol('a'), Symbol('b')))
          '*(a, b)'
  
          Args:
              name:
                  Name or symbol for the operator. Will be used as name for the new class if
                  `class_name` is not specified.
              arity:
                  The arity of the operator as explained in the documentation of `Operation`.
              class_name:
                  Name for the new operation class to be used instead of name. This argument
                  is required if `name` is not a valid python identifier.
  
          Keyword Args:
              associative:
                  See :attr:`~Operation.associative`.
              commutative:
                  See :attr:`~Operation.commutative`.
              one_identity:
                  See :attr:`~Operation.one_identity`.
              infix:
                  See :attr:`~Operation.infix`.
  
          Raises:
              ValueError: if the class name of the operation is not a valid class identifier.