@read_session
def get_replicas_state(scope=None, name=None, session=None):
    '\n    Method used by the necromancer to get all the replicas of a DIDs\n    :param scope: The scope of the file.\n    :param name: The name of the file.\n    :param session: The database session in use.\n\n    :returns: A dictionary with the list of states as keys and the rse_ids as value\n    '
    query = session.query(models.RSEFileAssociation.rse_id, models.RSEFileAssociation.state).filter_by(scope=scope, name=name)
    states = {}
    for res in query.all():
        (rse_id, state) = res
        if (state not in states):
            states[state] = []
        states[state].append(rse_id)
    return states
Method used by the necromancer to get all the replicas of a DIDs
:param scope: The scope of the file.
:param name: The name of the file.
:param session: The database session in use.

:returns: A dictionary with the list of states as keys and the rse_ids as value
@read_session
def get_replicas_state(scope=None, name=None, session=None):
    '\n    Method used by the necromancer to get all the replicas of a DIDs\n    :param scope: The scope of the file.\n    :param name: The name of the file.\n    :param session: The database session in use.\n\n    :returns: A dictionary with the list of states as keys and the rse_ids as value\n    '
    query = session.query(models.RSEFileAssociation.rse_id, models.RSEFileAssociation.state).filter_by(scope=scope, name=name)
    states = {}
    for res in query.all():
        (rse_id, state) = res
        if (state not in states):
            states[state] = []
        states[state].append(rse_id)
    return states