code: def _build_admin_context(request, customer):
          
          opts = customer._meta
          codename = get_permission_codename('change', opts)
          has_change_permission = request.user.has_perm('%s.%s' % (opts.app_label, codename))
          return {
              'has_change_permission': has_change_permission,
              'opts': opts
          }
docs: Build common admin context.