def get_slurm_url(slurm_config: dict, url_type: str):
    """get_slurm_nodes_url Get Slurm Nodes Url

    Get the url for reading nodes info from slurm

    Args:
        slurm_config (dict): Slurm Configuration
        url_type: Url type. nodes or jobs
    """
    base_url = f"http://{slurm_config['ip']}:{slurm_config['port']}"
    url_types = ['nodes', 'jobs']
    if url_type not in url_types:
        raise ValueError(f"Invalid url type. Expected one of: {url_types}")

    if url_type == 'nodes':
        url = f"{base_url}{slurm_config['slurm_nodes']}"
    else:
        url = f"{base_url}{slurm_config['slurm_jobs']}"
    
    return url