# swegym / project-monai__monai-5415

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

## Results by harness

_none yet_

## Instruction

```
MetaTensor size bug in transform function
Since SIZE is a function of the class metatensor, this sentence does not work. The correct way should be  "fg_indices.size()[0]".

https://github.com/Project-MONAI/MONAI/blob/f407fcce1c32c050f327b26a16b7f7bc8a01f593/monai/transforms/utils.py#L512
MetaTensor size bug in transform function
Since SIZE is a function of the class metatensor, this sentence does not work. The correct way should be  "fg_indices.size()[0]".

https://github.com/Project-MONAI/MONAI/blob/f407fcce1c32c050f327b26a16b7f7bc8a01f593/monai/transforms/utils.py#L512
```
---
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
