parameters: (cls,
             primitive_set: _primitive_set.PrimitiveSet,
             primitive_class: Type[P])
return_statement: return wrapper.wrap(primitive_set)
docstring: Wraps a set of primitives into a single primitive.
  
      Args:
        primitive_set: A PrimitiveSet object.
        primitive_class: Class of the output primitive.
      Returns:
        A primitive of type primitive_class that wraps the primitives in
        primitive_set.
      Raises:
        TinkError if no wrapper for this primitive class is registered or the type
        of the primitives in primitive_set are don't match the
        input_primitive_class of the wrapper.
docstring_summary: Wraps a set of primitives into a single primitive.
docstring_tokens: Wraps a set of primitives into a single primitive .
function: def wrap(cls,
             primitive_set: _primitive_set.PrimitiveSet,
             primitive_class: Type[P]) -> P:
      """Wraps a set of primitives into a single primitive.
  
      Args:
        primitive_set: A PrimitiveSet object.
        primitive_class: Class of the output primitive.
      Returns:
        A primitive of type primitive_class that wraps the primitives in
        primitive_set.
      Raises:
        TinkError if no wrapper for this primitive class is registered or the type
        of the primitives in primitive_set are don't match the
        input_primitive_class of the wrapper.
      """
      if primitive_class not in cls._wrappers:
        raise _tink_error.TinkError(
            'No PrimitiveWrapper registered for primitive {}.'
            .format(primitive_class.__name__))
      wrapper = cls._wrappers[primitive_class]
      if primitive_set.primitive_class() != wrapper.input_primitive_class():
        raise _tink_error.TinkError(
            'Wrapper for primitive {} wraps type {}, but the primitive_set'
            'has type {}'
            .format(wrapper.primitive_class().__name__,
                    wrapper.input_primitive_class().__name__,
                    primitive_set.primitive_class().__name__))
      return wrapper.wrap(primitive_set)
function_tokens: def wrap ( cls , primitive_set : _primitive_set . PrimitiveSet , primitive_class : Type [ P ] ) -> P : if primitive_class not in cls . _wrappers : raise _tink_error . TinkError ( 'No PrimitiveWrapper registered for primitive {}.' . format ( primitive_class . __name__ ) ) wrapper = cls . _wrappers [ primitive_class ] if primitive_set . primitive_class ( ) != wrapper . input_primitive_class ( ) : raise _tink_error . TinkError ( 'Wrapper for primitive {} wraps type {}, but the primitive_set' 'has type {}' . format ( wrapper . primitive_class ( ) . __name__ , wrapper . input_primitive_class ( ) . __name__ , primitive_set . primitive_class ( ) . __name__ ) ) return wrapper . wrap ( primitive_set )