def METHOD_NAME(
    self,
    cls,
    data,
    pending_relations=None,
    api_key=djstripe_settings.STRIPE_SECRET_KEY,
):
    super().METHOD_NAME(
        cls, data, pending_relations=pending_relations, api_key=api_key
    )
    # set the livemode if not returned by data
    if "livemode" not in data.keys() and self.djstripe_owner_account is not None:
        # Platform Account
        if self == self.djstripe_owner_account:
            self.livemode = None
        else:
            # Connected Account
            _, self.livemode = get_api_key_details_by_prefix(api_key)
    # save the updates
    self.save()