<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetAuthorizationHeader(cosmos_client, verb, path, resource_id_or_fullname, is_name_based, resource_type, headers):
 """Gets the authorization header. :param cosmos_client.CosmosClient cosmos_client: :param str verb: :param str path: :param str resource_id_or_fullname: :param str resource_type: :param dict headers: :return: The authorization headers. :rtype: dict """

    # In the AuthorizationToken generation logic, lower casing of ResourceID is required as rest of the fields are lower cased
    # Lower casing should not be done for named based "ID", which should be used as is
    if resource_id_or_fullname is not None and not is_name_based:
        resource_id_or_fullname = resource_id_or_fullname.lower()

    if cosmos_client.master_key:
        return __GetAuthorizationTokenUsingMasterKey(verb,
                                                    resource_id_or_fullname,
                                                    resource_type,
                                                    headers,
                                                    cosmos_client.master_key)
    elif cosmos_client.resource_tokens:
        return __GetAuthorizationTokenUsingResourceTokens(
            cosmos_client.resource_tokens, path, resource_id_or_fullname)