<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_temporary_projects(enabled_regions, args):
 """ Creates a temporary project needed to build an underlying workflow for a global workflow. Returns a dictionary with region names as keys and project IDs as values The regions in which projects will be created can be: i. regions specified in dxworkflow.json "regionalOptions" ii. regions specified as an argument to "dx build" iii. current context project, if None of the above are set If both args and dxworkflow.json specify regions, they must match. """

    # Create one temp project in each region
    projects_by_region = {}  # Project IDs by region
    for region in enabled_regions:
        try:
            project_input = {"name": "Temporary build project for dx build global workflow",
                             "region": region}
            if args.bill_to:
                project_input["billTo"] = args.bill_to
            temp_project = dxpy.api.project_new(project_input)["id"]
            projects_by_region[region] = temp_project
            logger.debug("Created temporary project {} to build in".format(temp_project))
        except:
            # Clean up any temp projects that might have been created
            if projects_by_region:
                dxpy.executable_builder.delete_temporary_projects(projects_by_region.values())
            err_exit()
    return projects_by_region