def get_statement_queries(stmts, **params):
    def pick_ns(ag):
        for ns in ['HGNC', 'FPLX', 'CHEMBL', 'CHEBI', 'GO', 'MESH']:
            if ns in ag.db_refs.keys():
                dbid = ag.db_refs[ns]
                break
        else:
            ns = 'TEXT'
            dbid = ag.name
        return '%s@%s' % (dbid, ns)
    queries = []
    url_base = get_url_base('statements/from_agents')
    non_binary_statements = [Complex, SelfModification, ActiveForm]
    for stmt in stmts:
        kwargs = {}
        if type(stmt) not in non_binary_statements:
            for pos, ag in zip(['subject', 'object'], stmt.agent_list()):
                if ag is not None:
                    kwargs[pos] = pick_ns(ag)
        else:
            for i, ag in enumerate(stmt.agent_list()):
                if ag is not None:
                    kwargs['agent%d' % i] = pick_ns(ag)
        kwargs['type'] = stmt.__class__.__name__
        kwargs.update(params)
        query_str = '?' + '&'.join(['%s=%s' % (k, v) for k, v in kwargs.items()
                                    if v is not None])
        queries.append(url_base + query_str)
    return queries