input: Write a Python function to compute the average salary of a dataset from a given CSV file named 'salary.csv'. The function should read the CSV file, calculate the total salary and the number of entries, and return the average salary. If the file is empty or if there are no salary entries, return 0. Use the 'csv' module to handle the CSV file operations.
  
  def get_average_salary(filename):
    total = 0
    count = 0
  
    with open(filename, 'r') as csvfile:
      csvreader = csv.reader(csvfile)
      next(csvreader) # skip header
  
      # loop through the CSV rows
      for row in csvreader:
        total += int(row[1])
        count += 1
    
    if count == 0:
      return 0
    return total/count
  
  assert get_average_salary('salary.csv')==2000.0
  assert get_average_salary('empty.csv')==0
output: def get_average_salary(filename):
    total = 0
    count = 0
  
    with open(filename, 'r') as csvfile:
      csvreader = csv.reader(csvfile)
      next(csvreader) # skip header
  
      # loop through the CSV rows
      for row in csvreader:
        total += int(row[1])
        count += 1
    
    if count == 0:
      return 0
    return total/count