def get_root_package_name(name: str) ->str:
    """Get the root package name of a nested module one.

    Args:
      name (str): Full name of the module

    Returns:
      str: The root package name

    Examples:
      >>> get_root_package_name('weather.nested.file')
      'weather'
      >>> get_root_package_name('weather')
      'weather'

    """
    return name.split('.')[0] if name else name
