#NEWLINE# def spawn( self , process ) : #NEWLINE# #INDENT# "Spawn a process.\n\n    Spawning a process binds it to this context and assigns the process a\n    pid which is returned.  The process' ``initialize`` method is called.\n\n    Note: A process cannot send messages until it is bound to a context.\n\n    :param process: The process to bind to this context.\n    :type process: :class:`Process`\n    :return: The pid of the process.\n    :rtype: :class:`PID`\n    " #NEWLINE# self . _assert_started ( ) #NEWLINE# process . bind ( self ) #NEWLINE# self . http . mount_process ( process ) #NEWLINE# self . _processes [ process . pid ] = process #NEWLINE# process . initialize ( ) #NEWLINE# return process . pid