def define_orderers(orderer_names, orderer_hosts, domain=None):
    """Define orderers as connection objects.

        Args:
            orderer_names (Iterable): List of orderer names.
            orderer_hosts (Iterable): List of orderer hosts.
            domain (str): Domain used. Defaults to none.

        Returns:
            dict: A dictionary of Orderer Connections
    """
    orderer_connections = {}
    for name, host in zip(orderer_names, orderer_hosts):
        if domain:
            key = "{name}.{domain}".format(name=name, domain=domain)
        else:
            key = name
        orderer_connections[key] = {"url": ("grpc://" + host + ":7050")}
    return orderer_connections