input: Write a function to identify and fix any bugs in the given Python code snippet.
  
  ### Input:
  
  def sum_list(list):
      sum_list = 0
      for num in list:
          sum_list += num
      return sum
  
  
  ### Output:
  
  def sum_list(list):
      sum_list = 0
      for num in list:
          sum_list += num
      return sum_list
  
  
  assert sum_list([1, 2, 3, 4, 5]) == 15
  assert sum_list([]) == 0
  assert sum_list([-1, -2, -3]) == -6
  assert sum_list([0, 0, 0]) == 0
  assert sum_list([10]) == 10
  
  ### Explanation:
  The original code has a bug where the function returns `sum` instead of `sum_list`. The corrected code returns `sum_list`, which correctly accumulates the sum of the list elements.
output: def sum_list(list):
      sum_list = 0
      for num in list:
          sum_list += num
      return sum_list