@staticmethod
def _maybe_get_index(param, opt, idx, decs):
    """ Placeholder's option is always checked by index. """
    if not param:
        return -1
    if idx is not None:
        return idx
    for i, o in enumerate(decs[param].value):
        if str(o) == str(opt):
            return i
