def match_server_args_factory(tick_rate: int, realtime: bool, observations_only: bool, env_config_string: str):
    """ Helper factory to make a argument dictionary for servers with varying ports """

    def match_server_args(port):
        arg_dict = {
            "tick_rate": tick_rate,
            "port": port,
            "realtime": realtime,
            "observations_only": observations_only,
            "config": env_config_string
        }
        return arg_dict

    return match_server_args