Self Detecting branch_env