def get_required_headers(service, endpoint):
    """
    :param Service service:
        The service being called
    :param Endpoint endpoint:
        The endpoint being called
    :return:
        Headers required by the ``service`` and the ``endpoint`` being called
    :rtype:
        dict
    """
    headers = {}
    headers.update(service.required_headers)
    headers.update(endpoint.required_headers)
    return headers