<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _torque_info(queue):
 """Return machine information for a torque job scheduler using pbsnodes. To identify which host to use it tries to parse available hosts from qstat -Qf `acl_hosts`. If found, it uses these and gets the first node from pbsnodes matching to the list. If no attached hosts are available, it uses the first host found from pbsnodes. """

    nodes = _torque_queue_nodes(queue)
    pbs_out = subprocess.check_output(["pbsnodes"]).decode()
    info = {}
    for i, line in enumerate(pbs_out.split("\n")):
        if i == 0 and len(nodes) == 0:
            info["name"] = line.strip()
        elif line.startswith(nodes):
            info["name"] = line.strip()
        elif info.get("name"):
            if line.strip().startswith("np = "):
                info["cores"] = int(line.replace("np = ", "").strip())
            elif line.strip().startswith("status = "):
                mem = [x for x in pbs_out.split(",") if x.startswith("physmem=")][0]
                info["memory"] = float(mem.split("=")[1].rstrip("kb")) / 1048576.0
                return [info]