This function could just be...

```python
if isinstance(fp, HTTPResponse):
    return fp.fp is None

return fp.closed
```