from pathlib import Path


def get_theme_base_dirs_from_settings(theme_base_dirs=None):
    """
    Return base directories that contains all the themes.

    Example:
        >> get_theme_base_dirs_from_settings('/edx/app/ecommerce/ecommerce/themes')
        ['/edx/app/ecommerce/ecommerce/themes']

    Args:
        themes_base_dirs (list of str): Paths to themes base directories.

    Returns:
         (List of Paths): Base theme directory paths
    """
    theme_base_dirs_paths = []
    if theme_base_dirs:
        theme_base_dirs_paths.extend([Path(theme_base_dir) for theme_base_dir in theme_base_dirs])
    return theme_base_dirs_paths