def get_active_assets(n, c, investment_period):
    """
    Getter function. Get True values for elements of component c which are active
    at a given investment period. These are calculated from lifetime and the
    build year.
    """
    if investment_period not in n.investment_periods:
        raise ValueError("Investment period not in `network.investment_periods`")
    return n.df(c).eval("build_year <= @investment_period < build_year + lifetime")