docs: def _private_packages_allowed():
      """
      Checks if the current user is allowed to create private packages.
  
      In the public cloud, the user needs to be on a paid plan.
      There are no restrictions in other deployments.
      """
      if not HAVE_PAYMENTS or TEAM_ID:
          return True
  
      customer = _get_or_create_customer()
      plan = _get_customer_plan(customer)
      return plan != PaymentPlan.FREE