def get_hostgroup_flag(code):
    """Get hostgroup flag from code."""
    hostgroup_flag = {0: "Plain", 4: "Discover"}

    if code in hostgroup_flag:
        return hostgroup_flag[code] + " (" + str(code) + ")"

    return "Unknown ({})".format(str(code))