def METHOD_NAME(completion, entrystr, iter, data):
    modelstr = completion.get_model()[iter][0].lower()
    modeltype = completion.get_model()[iter][1]
    parts = entrystr.split()
    if len(parts) == 1 and modeltype == TYPE_COMMAND:
        return modelstr.startswith(entrystr)
    elif len(parts) == 2:
        if parts[0] == "help":
            return modelstr.startswith(parts[1]) and modeltype == TYPE_HELP
        else:
            return (
                parts[0] in FICS_COMMANDS
                and modelstr.startswith(parts[1].lower())
                and modeltype == TYPE_USER
            )