def get_model_num(conn, population, poi, metric):
    """ Takes user specifications about the population of interest, POI, 
    and the metric. Returns a model number.

     Parameters
     ----------
     conn : sqlalchemy connection object
         Connection to project database in postgres
     population : str
         Subpopulation of interest
     poi : str
         Points of interest (i.e, hospitals)
    metric : str
        System for measuring connectivity (i.e., aerial distance)

     Returns
     -------
     model_num: int
         Id number of a model for querying

    """
    query = """ SELECT model_id
                FROM model.models
                WHERE population = population
                    AND metric = metric
                    """
    # subsetting for first element gets us the model number                
    model_num = conn.execute(query).fetchone()[0] 
    return(model_num)