def get_nested_attr(obj, key):
    """Get a nested attribute from a dictionary

    Args:
        obj (dict): The top-level dictionaty
        key (str): The dot-separated key

    Returns: The value or None
    """
    parts = key.split('.')
    for part in parts[:-1]:
        obj = obj.get(part, {})
    return obj.get(parts[-1])
