def get_controller_index_by_type(net, ctrl_type, idx=[]):
    """
    Returns controller indices of a given type as list.
    """
    idx = idx if len(idx) else net.controller.index
    return [i for i in idx if isinstance(net.controller.object.at[i], ctrl_type)]