def find_arg_index_by_name(decls, name):
    """Return index of argument in decls with name.

    Args:
        decls - list of Declaration
        name  - argument to find
    """
    if decls is None:
        return -1
    for i, decl in enumerate(decls):
        if decl.name == name:
            return i
    return -1