input: Write a function to compute the average salary from a given CSV file containing columns 'name' and 'salary'. If the CSV file is empty or contains no 'salary' data, return 0. The function should ignore the header row and sum up the salaries and the count of salaries, then return the average.
  assert get_average_salary('salary.csv')==2000.0
  assert get_average_salary('empty.csv')==0
  assert get_average_salary('nosalary.csv')==0
output: def get_average_salary(filename):
      total_salary = 0
      count = 0
      with open(filename, 'r') as file:
          reader = csv.DictReader(file)
          for row in reader:
              if 'salary' in row and row['salary']:
                  total_salary += float(row['salary'])
                  count += 1
      if count == 0:
          return 0
      return total_salary / count