def METHOD_NAME(num_trials: int, secrets: Dict[str, str], prefix: Optional[str] = None) -> str:
    config_dict = {
        "description": "noop_random",
        "checkpoint_storage": {
            "type": "s3",
            "access_key": secrets["INTEGRATIONS_S3_ACCESS_KEY"],
            "secret_key": secrets["INTEGRATIONS_S3_SECRET_KEY"],
            "bucket": secrets["INTEGRATIONS_S3_BUCKET"],
        },
        "hyperparameters": {"global_batch_size": 1},
        "searcher": {
            "metric": "validation_error",
            "smaller_is_better": True,
            "name": "random",
            "max_trials": num_trials,
            "max_length": {"batches": 100},
        },
        "entrypoint": "model_def:NoOpTrial",
    }
    if prefix is not None:
        config_dict["checkpoint_storage"]["prefix"] = prefix  # type: ignore
    return str(yaml.dump(config_dict))