def _resolve_subkeys(key, separator='.'):
    """Given a key which may actually be a nested key, return the top level
    key and any nested subkeys as separate values.

    Args:
        key (str): A string that may or may not contain the separator.
        separator (str): The namespace separator. Defaults to `.`.

    Returns:
        Tuple[str, str]: The key and subkey(s).
    """
    subkey = None
    if separator in key:
        index = key.index(separator)
        subkey = key[index + 1:]
        key = key[:index]
    return key, subkey
