Oh man this section is tricky to read. What do you think about splitting these out, like this

```python
if inspect.isclass(v) and issubclass(v, LinkedResource):
    _handle_embedded_resource(embedded, data, k, v)
elif isinstance(v, list) and inspect.isclass(v[0]) and issubclass(v[0], LinkedResource):
    _handle_resource_array(embedded, data, k, v)
```

Also, what do k and v represent in this case?