def get_deployment_labels(deployments):
    """
    Get labels for a given list of deployments.

    Returns a dictionary in the below format:

    { deployment_name: {dictionary of deployment labels}, ...}
    """
    deployment_dictionary = {}
    for deployment in deployments:
        deployment_dictionary[deployment['metadata']['name']] = deployment['spec']['template']['metadata']['labels']
    return deployment_dictionary