docs: def _apply_ranges(self, pat, hosts):
          """
          given a pattern like foo, that matches hosts, return all of hosts
          given a pattern like foo[0:5], where foo matches hosts, return the first 6 hosts
          """ 
  
          (loose_pattern, limits) = self._enumeration_info(pat)
          if not limits:
              return hosts
  
          (left, right) = limits
          enumerated = enumerate(hosts)
          if left == '':
              left = 0
          if right == '':
              right = 0
          left=int(left)
          right=int(right)
          enumerated = [ h for (i,h) in enumerated if i>=left and i<=right ]
          return enumerated