code: def get_plan_table(self, plan_list):
          
  
          # Retrieve all quotas that are used by any ``Plan`` in ``plan_list``
          quota_list = Quota.objects.all().filter(planquota__plan__in=plan_list).distinct()
  
          # Create random access dict that for every ``Plan`` map ``Quota`` -> ``PlanQuota``
          plan_quotas_dic = {}
          for plan in plan_list:
              plan_quotas_dic[plan] = {}
              for plan_quota in plan.planquota_set.all():
                  plan_quotas_dic[plan][plan_quota.quota] = plan_quota
  
          # Generate data structure described in method docstring, propagate ``None`` whenever
          # ``PlanQuota`` is not available for given ``Plan`` and ``Quota``
          return map(lambda quota: (quota,
                                    map(lambda plan: plan_quotas_dic[plan].get(quota, None), plan_list)
  
          ), quota_list)
docs: This method return a list in following order:
          [
              ( Quota1, [ Plan1Quota1, Plan2Quota1, ... , PlanNQuota1] ),
              ( Quota2, [ Plan1Quota2, Plan2Quota2, ... , PlanNQuota2] ),
              ...
              ( QuotaM, [ Plan1QuotaM, Plan2QuotaM, ... , PlanNQuotaM] ),
          ]
  
          This can be very easily printed as an HTML table element with quotas by row.
  
          Quotas are calculated based on ``plan_list``. These are all available quotas that are
          used by given plans. If any ``Plan`` does not have any of ``PlanQuota`` then value ``None``
          will be propagated to the data structure.