def get_fake_id(self, obj):
        """
        Get a stable fake id from a real Stripe object, we use this so that fixtures
         are stable
        :param obj:
        :return:
        """
        fake_id = None

        if isinstance(obj, str):
            real_id = obj
            real_id_map = {v: k for k, v in self.fake_id_map.items()}

            fake_id = real_id_map.get(real_id)
        elif "metadata" in obj:
            # Note: not all objects have a metadata dict
            # (eg Account, BalanceTransaction don't)
            fake_id = obj.get("metadata", {}).get(FAKE_ID_METADATA_KEY)
        elif obj.get("object") == "balance_transaction":
            # assume for purposes of fixture generation that 1 balance_transaction per
            # source charge (etc)
            fake_source_id = self.get_fake_id(obj["source"])

            fake_id = f"txn_fake_{fake_source_id}"

        return fake_id

        Get a stable fake id from a real Stripe object, we use this so that fixtures
         are stable
        :param obj:
        :return:
        
tests/apps/example/management/commands/regenerate_test_fixtures.py