def METHOD_NAME(text: str) -> LabelImportFormat:
    try:
        data = json.loads(text)
    except json.JSONDecodeError:
        return LabelImportFormat.UNKNOWN
    if isinstance(data, dict) and len(data) > 0:
        if len(data) == 1 or len(data) == 2:
            if "transactions" in data:
                return LabelImportFormat.ACCOUNT
            if "keys" in data:
                if "account_fingerprint" in data["keys"] and "entries" in data["keys"]:
                    return LabelImportFormat.ACCOUNT
        if all(isinstance(k, str) and isinstance(v, str) for k, v in data.items()):
            return LabelImportFormat.LABELSYNC
    return LabelImportFormat.UNKNOWN