(agent_pid: str)
return m.group(1)
Convert the agent PID from Mesos into an IP address

    :param: agent pid (this is in the format 'slave(1)@10.40.31.172:5051')
    :returns: ip address
Convert the agent PID from Mesos into an IP address
Convert the agent PID from Mesos into an IP address
def agent_pid_to_ip(agent_pid: str) -> str:
    """Convert the agent PID from Mesos into an IP address

    :param: agent pid (this is in the format 'slave(1)@10.40.31.172:5051')
    :returns: ip address
    """
    m = re.match(r".+?@([\d\.]+):\d+", agent_pid)
    assert m
    return m.group(1)
def agent_pid_to_ip ( agent_pid : str ) -> str : m = re . match ( r".+?@([\d\.]+):\d+" , agent_pid ) assert m return m . group ( 1 )