Test confirmed to work, split check for subpart into separate function,

Fixed NameError for `isPart` when importing from relative path (relative
to model location)