def query_templater(
    table_name,
    columns=None,
    conds=None,
    db_name="darpa_data"
):
    """ Generates an appropriate SQL query for db_name
        Params:
            table_name : str
                Some darpa_data table
            columns : [str] or None
                A list of column names to fetch from table_name.
            conds : [str]
                A set of conditions
            db_name : str
                some database to query
        Returns: str
            A string of form "select {columns} from {db_name}.{table_name}
            where {conds}"
    """
    if(columns is None):
        columns = ["*"]
    ret = "select {1!s} from {2!s}.{0!s} ".format(
        table_name, ",".join(columns), db_name
    )
    if(conds is not None and len(conds) > 0):
        ret += "where " + " and ".join(conds)
    return ret