def METHOD_NAME(repl_set_payload, cluster_role):
    replset_name = repl_set_payload["set"]
    replset_state = repl_set_payload["myState"]
    return ReplicaSetDeployment(replset_name, replset_state, cluster_role=cluster_role)