code: def convert_args_to_list(args):
      
      list_of_pairs = []
      if len(args) == 0:
          return []
  
      if any(isinstance(arg, (list, tuple)) for arg in args):
          # Domain([[1, 4]])
          # Domain([(1, 4)])
          # Domain([(1, 4), (5, 8)])
          # Domain([[1, 4], [5, 8]])
          if len(args) == 1 and \
                  any(isinstance(arg, (list, tuple)) for arg in args[0]):
              for item in args[0]:
                  list_of_pairs.append(list(item))
          else:
              # Domain([1, 4])
              # Domain((1, 4))
              # Domain((1, 4), (5, 8))
              # Domain([1, 4], [5, 8])
              for item in args:
                  list_of_pairs.append(list(item))
      else:
          # Domain(1, 2)
          if len(args) == 2:
              list_of_pairs.append(list(args))
          else:
              msg = "The argument type is invalid. ".format(args)
              raise TypeError(msg)
  
      return list_of_pairs
docs: Convert all iterable pairs of inputs into a list of list