input: Write a function to compute the average salary of people by reading from a given CSV file which contains columns for name and salary. The function should return the average salary.
  assert get_average_salary('salary.csv')==2000.0
  assert get_average_salary('test_salaries.csv')==2500.0
  assert get_average_salary('empty.csv')==0.0
  assert get_average_salary('single_salary.csv')==5000.0
  assert get_average_salary('missing_file.csv')==0.0
output: def get_average_salary(filename):
      try:
          with open(filename, 'r') as file:
              reader = csv.DictReader(file)
              salaries = [float(row['salary']) for row in reader if row['salary'].replace('.', '', 1).isdigit()]
              if salaries:
                  return sum(salaries) / len(salaries)
              else:
                  return 0.0
      except (FileNotFoundError, KeyError):
          return 0.0