<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _add_macro_map(context, package_name, macro_map):
 """Update an existing context in-place, adding the given macro map to the appropriate package namespace. Adapter packages get inserted into the global namespace. """

    key = package_name
    if package_name in PACKAGES:
        key = GLOBAL_PROJECT_NAME
    if key not in context:
        context[key] = {}

    context[key].update(macro_map)