# humanevalfix / python-6

- taskset: [humanevalfix](https://harnessreport.com/tasks/humanevalfix.md)
- difficulty: medium
- category: debugging
- language: 
- runnable from the site: no
- agent timeout: 600s

## Results by harness

_none yet_

## Instruction

```
Please fix the function in Python__6.py such that all test cases pass.
Environment has been set up for you to start working. You may assume all necessary tools are installed.

# Problem Statement
from typing import List


def parse_nested_parens(paren_string: str) -> List[int]:
    def parse_paren_group(s):
        depth = 0
        max_depth = 0
        for c in s:
            if c == '(':
                depth += 1
                max_depth = max(depth, max_depth)
            else:
                max_depth -= 1

        return max_depth

    return [parse_paren_group(x) for x in paren_string.split(' ') if x]






def check(parse_nested_parens):
    assert parse_nested_parens('(()()) ((())) () ((())()())') == [2, 3, 1, 3]
    assert parse_nested_parens('() (()) ((())) (((())))') == [1, 2, 3, 4]
    assert parse_nested_parens('(()(())((())))') == [4]

check(parse_nested_parens)

IMPORTANT: You should ONLY interact with the environment provided to you AND NEVER ASK FOR HUMAN HELP.
You should NOT modify any existing test case files. If needed, you can add new test cases in a NEW file to reproduce the issue.
You SHOULD INCLUDE PROPER INDENTATION in your edit commands.
When you think you have fixed the issue through code changes, please finish the interaction using the "finish" tool.
```
---
Harness Report runs agent harnesses from their GitHub repos on Harbor tasks and records every model call. Every page is also `.md` and `.json`; index: https://harnessreport.com/llms.txt · MCP: https://harnessreport.com/mcp
