def test_prorated_subscription_with_consumed_mfs_underflow(self):

        prev_billing_date = '2015-02-14'
        curr_billing_date = '2015-03-02'

        customer = CustomerFactory.create(
            consolidated_billing=False, sales_tax_percent=Decimal('0.00'))
        metered_feature = MeteredFeatureFactory(included_units=Decimal('20.00'))
        plan = PlanFactory.create(interval='month', interval_count=1,
                                  generate_after=120, enabled=True,
                                  amount=Decimal('200.00'),
                                  metered_features=[metered_feature])
        start_date = dt.date(2015, 2, 14)

        # Create the prorated subscription
        subscription = SubscriptionFactory.create(
            plan=plan, start_date=start_date, customer=customer, trial_end=None)
        subscription.activate()
        subscription.save()

        call_command('generate_docs', date=prev_billing_date,
                    stdout=self.output)

        assert Proforma.objects.all().count() == 1
        assert Invoice.objects.all().count() == 0

        MeteredFeatureUnitsLogFactory.create(
            subscription=subscription, metered_feature=metered_feature,
            start_date=dt.date(2015, 2, 14), end_date=dt.date(2015, 2, 28),
            consumed_units=Decimal('10.00'))

        call_command('generate_docs', date=curr_billing_date,
                    stdout=self.output)

        assert Proforma.objects.all().count() == 2
        assert Invoice.objects.all().count() == 0

        proforma = Proforma.objects.get(id=2)
        # Expect 2 entries: the plan for the next month and the consumed mfs.
        # with 0.
        assert proforma.proforma_entries.all().count() == 2
        assert proforma.total == plan.amount
This function is used to interpolate missing data in the image.
dataset/ETHPy150Open PressLabs/silver/silver/tests/commands/test_generate_docs.py/TestInvoiceGenerationCommand.test_prorated_subscription_with_consumed_mfs_underflow--crossover with--dataset/ETHPy150Open bolme/pyvision/src/pyvision/types/RangeImage.py/RangeImage.populateMissingData