<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def str_to_pool(upstream):
 """ Given a string containing an nginx upstream section, return the pool name and list of nodes. """

    name = re.search('upstream +(.*?) +{', upstream).group(1)
    nodes = re.findall('server +(.*?);', upstream)
    return name, nodes