Not sure about this error handling - it's a library module, so I typically avoid logwarn's in these and use exceptions to float the error up so you can let the user deal with it as they wish. But this is not a fatal exception and you still want to return a result even if there were a few errors.

Here the logging doesn't help the calling program know what failed...only way to know is have eyeballs on the output. For this I sometimes return a tuple, e.g. (resource_index, invalid_resources). Something like this?