docs: def port_number_range(prange):
      """ Port number range validation and expansion. """
      # first, try it as a normal port number
      try:
          return port_number(prange)
      except ValueError:
          pass
      # then, consider it as a range with the format "x-y" and expand it
      try:
          bounds = list(map(int, re.match(r'^(\d+)\-(\d+)$', prange).groups()))
          if bounds[0] > bounds[1]:
              raise AttributeError()
      except (AttributeError, TypeError):
          raise ValueError("Bad port number range")
      return list(range(bounds[0], bounds[1] + 1))