@stream_session
def list_replicas(dids, schemes=None, unavailable=False, request_id=None, ignore_availability=True, all_states=False, pfns=True, rse_expression=None, client_location=None, domain=None, sign_urls=False, signature_lifetime=None, resolve_archives=True, resolve_parents=False, nrandom=None, updated_after=None, session=None):
    "\n    List file replicas for a list of data identifiers (DIDs).\n\n    :param dids: The list of data identifiers (DIDs).\n    :param schemes: A list of schemes to filter the replicas. (e.g. file, http, ...)\n    :param unavailable: (deprecated) Also include unavailable replicas in the list.\n    :param request_id: ID associated with the request for debugging.\n    :param ignore_availability: Ignore the RSE blocklisting.\n    :param all_states: Return all replicas whatever state they are in. Adds an extra 'states' entry in the result dictionary.\n    :param rse_expression: The RSE expression to restrict list_replicas on a set of RSEs.\n    :param client_location: Client location dictionary for PFN modification {'ip', 'fqdn', 'site', 'latitude', 'longitude'}\n    :param domain: The network domain for the call, either None, 'wan' or 'lan'. None is automatic mode, 'all' is both ['lan','wan']\n    :param sign_urls: If set, will sign the PFNs if necessary.\n    :param signature_lifetime: If supported, in seconds, restrict the lifetime of the signed PFN.\n    :param resolve_archives: When set to true, find archives which contain the replicas.\n    :param resolve_parents: When set to true, find all parent datasets which contain the replicas.\n    :param updated_after: datetime (UTC time), only return replicas updated after this time\n    :param session: The database session in use.\n    "
    if dids:
        filter = {'vo': dids[0]['scope'].vo}
    else:
        filter = {'vo': 'def'}
    (file_clause, dataset_clause, state_clause, constituent_clause, files_wo_replica) = _resolve_dids(dids=dids, unavailable=unavailable, ignore_availability=ignore_availability, all_states=all_states, resolve_archives=resolve_archives, session=session)
    rse_clause = []
    if rse_expression:
        for rse in parse_expression(expression=rse_expression, filter=filter, session=session):
            rse_clause.append((models.RSEFileAssociation.rse_id == rse['id']))
    (yield from _pick_n_random(nrandom, _list_replicas(dataset_clause, file_clause, state_clause, pfns, schemes, files_wo_replica, rse_clause, client_location, domain, sign_urls, signature_lifetime, constituent_clause, resolve_parents, updated_after, filter, ignore_availability, session)))
List file replicas for a list of data identifiers (DIDs).

:param dids: The list of data identifiers (DIDs).
:param schemes: A list of schemes to filter the replicas. (e.g. file, http, ...)
:param unavailable: (deprecated) Also include unavailable replicas in the list.
:param request_id: ID associated with the request for debugging.
:param ignore_availability: Ignore the RSE blocklisting.
:param all_states: Return all replicas whatever state they are in. Adds an extra 'states' entry in the result dictionary.
:param rse_expression: The RSE expression to restrict list_replicas on a set of RSEs.
:param client_location: Client location dictionary for PFN modification {'ip', 'fqdn', 'site', 'latitude', 'longitude'}
:param domain: The network domain for the call, either None, 'wan' or 'lan'. None is automatic mode, 'all' is both ['lan','wan']
:param sign_urls: If set, will sign the PFNs if necessary.
:param signature_lifetime: If supported, in seconds, restrict the lifetime of the signed PFN.
:param resolve_archives: When set to true, find archives which contain the replicas.
:param resolve_parents: When set to true, find all parent datasets which contain the replicas.
:param updated_after: datetime (UTC time), only return replicas updated after this time
:param session: The database session in use.
@stream_session
def list_replicas(dids, schemes=None, unavailable=False, request_id=None, ignore_availability=True, all_states=False, pfns=True, rse_expression=None, client_location=None, domain=None, sign_urls=False, signature_lifetime=None, resolve_archives=True, resolve_parents=False, nrandom=None, updated_after=None, session=None):
    "\n    List file replicas for a list of data identifiers (DIDs).\n\n    :param dids: The list of data identifiers (DIDs).\n    :param schemes: A list of schemes to filter the replicas. (e.g. file, http, ...)\n    :param unavailable: (deprecated) Also include unavailable replicas in the list.\n    :param request_id: ID associated with the request for debugging.\n    :param ignore_availability: Ignore the RSE blocklisting.\n    :param all_states: Return all replicas whatever state they are in. Adds an extra 'states' entry in the result dictionary.\n    :param rse_expression: The RSE expression to restrict list_replicas on a set of RSEs.\n    :param client_location: Client location dictionary for PFN modification {'ip', 'fqdn', 'site', 'latitude', 'longitude'}\n    :param domain: The network domain for the call, either None, 'wan' or 'lan'. None is automatic mode, 'all' is both ['lan','wan']\n    :param sign_urls: If set, will sign the PFNs if necessary.\n    :param signature_lifetime: If supported, in seconds, restrict the lifetime of the signed PFN.\n    :param resolve_archives: When set to true, find archives which contain the replicas.\n    :param resolve_parents: When set to true, find all parent datasets which contain the replicas.\n    :param updated_after: datetime (UTC time), only return replicas updated after this time\n    :param session: The database session in use.\n    "
    if dids:
        filter = {'vo': dids[0]['scope'].vo}
    else:
        filter = {'vo': 'def'}
    (file_clause, dataset_clause, state_clause, constituent_clause, files_wo_replica) = _resolve_dids(dids=dids, unavailable=unavailable, ignore_availability=ignore_availability, all_states=all_states, resolve_archives=resolve_archives, session=session)
    rse_clause = []
    if rse_expression:
        for rse in parse_expression(expression=rse_expression, filter=filter, session=session):
            rse_clause.append((models.RSEFileAssociation.rse_id == rse['id']))
    (yield from _pick_n_random(nrandom, _list_replicas(dataset_clause, file_clause, state_clause, pfns, schemes, files_wo_replica, rse_clause, client_location, domain, sign_urls, signature_lifetime, constituent_clause, resolve_parents, updated_after, filter, ignore_availability, session)))