input: Write a function to schedule processes based on their remaining times using a CPU scheduling algorithm.
  assert [p.name for p in schedule_processes([Process('P1', 4), Process('P2', 2), Process('P3', 1)])] == ['P3', 'P2', 'P1']
  assert [p.name for p in schedule_processes([Process('P1', 3), Process('P2', 5), Process('P3', 2)])] == ['P3', 'P1', 'P2']
  assert [p.name for p in schedule_processes([Process('P1', 6), Process('P2', 1), Process('P3', 5)])] == ['P2', 'P3', 'P1']
output: class Process:
      def __init__(self, name, remaining_time):
          self.name = name
          self.remaining_time = remaining_time
  
  def schedule_processes(processes):
      return sorted(processes, key=lambda p: p.remaining_time)