input: Write a function to identify and fix potential bugs in the given Python code snippet for calculating the sum of elements in a list. If the code is corrected correctly, return the fixed code; otherwise, return an appropriate error message.
  assert sum_list([1, 2, 3, 4, 5])==15
  assert sum_list([0, 0, 0, 0])==0
  assert sum_list([-1, 1, 2, -2])==0
  assert sum_list([])==0
  assert sum_list("not a list")=="Invalid input: Expected a list"
output: def sum_list(lst):
      if not isinstance(lst, list):
          return "Invalid input: Expected a list"
      return sum(lst)