input: Write a function to compute the average salary from a dataset stored in 'salary.csv'. The function should read the file, calculate the average of the salaries, and return the result. If 'salary.csv' is empty, the function should return 0.
  
  assert get_average_salary('salary.csv') == 2000.0
  assert get_average_salary('empty_salary.csv') == 0
output: def get_average_salary(filename):
      try:
          with open(filename, 'r') as file:
              salaries = file.readlines()
              if not salaries:
                  return 0
              total = sum(float(salary) for salary in salaries)
              return total / len(salaries)
      except FileNotFoundError:
          return 0