code: def parse_number_factory(alg, sep, pre_sep):
      nan_replace = float("+inf") if alg & ns.NANLAST else float("-inf")
      def func(val, _nan_replace=nan_replace, _sep=sep):
          return _sep, _nan_replace if val != val else val
      if alg & ns.PATH and alg & ns.UNGROUPLETTERS and alg & ns.LOCALEALPHA:
          return lambda x: (((pre_sep,), func(x)),)
      elif alg & ns.UNGROUPLETTERS and alg & ns.LOCALEALPHA:
          return lambda x: ((pre_sep,), func(x))
      elif alg & ns.PATH:
          return lambda x: (func(x),)
      else:
          return func