input: Write a python function to fetch records from a MySQL database and return them as a pandas DataFrame.
  assert fetch_records("localhost", "username", "password", "database_name") is not None
  assert isinstance(fetch_records("localhost", "username", "password", "database_name"), pd.DataFrame)
  assert not fetch_records("localhost", "username", "password", "database_name").empty
output: def fetch_records(host, user, password, db_name):
      import pandas as pd
      import pymysql
  
      # Establishing a connection to the database
      connection = pymysql.connect(
          host=host,
          user=user,
          password=password,
          db=db_name
      )
  
      try:
          # Fetching records from the database
          query = "SELECT * FROM your_table_name"
          df = pd.read_sql(query, connection)
      finally:
          # Closing the connection
          connection.close()
          
      return df