code: def load_config(check_dir):
      
  
      # Defaults for top-level keys
      options = {
          "checks": "__init__.py",
          "dependencies": None,
          "translations": None
      }
  
      # Defaults for translation keys
      translation_options = {
          "localedir": "locale",
          "domain": "messages",
      }
  
      config_file = Path(check_dir) / ".cs50.yaml"
  
      with open(config_file) as f:
          config = lib50.config.load(f.read(), "check50")
  
      if isinstance(config, dict):
          options.update(config)
  
      if options["translations"]:
          if isinstance(options["translations"], dict):
              translation_options.update(options["translations"])
          options["translations"] = translation_options
  
      if isinstance(options["checks"], dict):
          # Compile simple checks
          with open(check_dir / "__init__.py", "w") as f:
              f.write(simple.compile(options["checks"]))
          options["checks"] = "__init__.py"
  
      return options
docs: Load configuration file from ``check_dir / ".cs50.yaml"``, applying
      defaults to unspecified values.
  
      :param check_dir: directory from which to load config file
      :type check_dir: str / Path
      :rtype: dict