def METHOD_NAME(
    self, name: str, ds: BaseDatasource
) -> DatasourceConfig:
    config = ds.config
    # 20230824 - Chetan - Kind of gross but this ensures that we have what we need for instantiate_class_from_config
    # There's probably a better way to do this with Marshmallow but this works
    config["name"] = name
    config["class_name"] = ds.__class__.__name__
    return datasourceConfigSchema.load(config)