def get_offering_size(host_id):
    """Return OFFERING_SIZE"""
    from physical.models import Host
    host = Host.objects.filter(id=host_id,).select_related('instance',).select_related(
        'databaseinfra',).select_related('cs_dbinfra_offering').select_related('cs_offering')
    try:
        host = host[0]
    except __HOLE__ as e:
        LOG.warn("Host id does not exists: {}. {}".format(host_id, e))
        return None

    return host.instance_set.all()[0].databaseinfra.cs_dbinfra_offering.get().offering.memory_size_mb
dataset/ETHPy150Open globocom/database-as-a-service/dbaas/maintenance/registered_functions/functools.py/get_offering_size