@tasks.register<EOL>def switch(poi):
parts = poi.split('<STR_LIT::>')<EOL>if len(parts) == <NUM_LIT:2>:<EOL><INDENT>container_name, product_name = parts<EOL><DEDENT>elif len(parts) == <NUM_LIT:1> and os.environ.get('<STR_LIT>'):<EOL><INDENT>container_name = os.environ.get('<STR_LIT>')<EOL>product_name = parts[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>', poi)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if container_name not in tasks.get_containers():<EOL><INDENT>raise ContainerNotFound('<STR_LIT>' % container_name)<EOL><DEDENT>elif product_name not in tasks.get_products(container_name):<EOL><INDENT>raise ProductNotFound('<STR_LIT>' % product_name)<EOL><DEDENT>else:<EOL><INDENT>print(SWITCH_TEMPLATE.format(<EOL>source_header=tasks.conf.SOURCE_HEADER,<EOL>container_name=container_name,<EOL>product_name=product_name<EOL>))<EOL><DEDENT>
Zaps into a specific product specified by switch context to the product of interest(poi)
A poi is:
    sdox:dev - for product "dev" located in container "sdox"

If poi does not contain a ":" it is interpreted as product name implying that a product within this
container is already active. So if this task is called with ape zap prod (and the corresponding container is
already zapped in), than only the product is switched.

After the context has been switched to sdox:dev additional commands may be available
that are relevant to sdox:dev
:param poi: product of interest, string: <container_name>:<product_name> or <product_name>.