'Get SiteTheme object for given site, returns default site theme if it can not
find a theme for the given site and `DEFAULT_SITE_THEME` setting has a proper value.
Args:
site (django.contrib.sites.models.Site): site object related to the current site.
default (openedx.core.djangoapps.models.SiteTheme): site theme object to return in case there is no theme
associated for the given site.
Returns:
SiteTheme object for given site or a default site passed in as the argument.'

@staticmethod
def get_theme(site, default=None):

    theme = site.themes.first()
    return (theme or default)
