code: def get_schema_file(db_version=1, db="mg_core", collection="materials"):
      
      d = get_schema_dir(db_version=db_version)
      schemafile = "{}.{}.json".format(db, collection)
      f = open(os.path.join(d, schemafile), "r")
      return f
docs: Get file with appropriate schema.
  
      :param db_version: Version of the database
      :type db_version: int
      :param db: Name of database, e.g. 'mg_core'
      :type db: str
      :param collection: Name of collection, e.g. 'materials'
      :type collection: str
      :return: File with schema
      :rtype: file
      :raise: IOError, if file is not found or not accessible