"""Utils.""" from nameparser import HumanName def split_full_name_safely(full_name_string: str) -> tuple[str, str]: """Safely splits a full name string into first and last name components. :param full_name_string: Full name of the user :return: A tuple of (first_name, last_name). Either may be an empty string if the input is missing a component (e.g. a single-word name). """ name_parts = HumanName(full_name_string) first_name = name_parts.first last_name = name_parts.last return first_name, last_name