def _get_context(keyspaces, connections):
    """Return all the execution contexts"""

    if keyspaces:
        if not isinstance(keyspaces, (list, tuple)):
            raise ValueError('keyspaces must be a list or a tuple.')

    if connections:
        if not isinstance(connections, (list, tuple)):
            raise ValueError('connections must be a list or a tuple.')

    keyspaces = keyspaces if keyspaces else [None]
    connections = connections if connections else [None]

    return product(connections, keyspaces)
def _get_context ( keyspaces , connections ) : if keyspaces : if not isinstance ( keyspaces , ( list , tuple ) ) : raise ValueError ( 'keyspaces must be a list or a tuple.' ) if connections : if not isinstance ( connections , ( list , tuple ) ) : raise ValueError ( 'connections must be a list or a tuple.' ) keyspaces = keyspaces if keyspaces else [ None ] connections = connections if connections else [ None ] return product ( connections , keyspaces )
Return all the execution contexts