def validate_extraction(self, buildtarget: InterpreterObject) -> None:
    if (not self.subdir.startswith(self.subproject_dir)):
        if buildtarget.subdir.startswith(self.subproject_dir):
            raise InterpreterException('Tried to extract objects from a subproject target.')
    else:
        if (not buildtarget.subdir.startswith(self.subproject_dir)):
            raise InterpreterException('Tried to extract objects from the main project from a subproject.')
        if (self.subdir.split('/')[1] != buildtarget.subdir.split('/')[1]):
            raise InterpreterException('Tried to extract objects from a different subproject.')
def validate_extraction(self, buildtarget: InterpreterObject) -> None:
    if (not self.subdir.startswith(self.subproject_dir)):
        if buildtarget.subdir.startswith(self.subproject_dir):
            raise InterpreterException('Tried to extract objects from a subproject target.')
    else:
        if (not buildtarget.subdir.startswith(self.subproject_dir)):
            raise InterpreterException('Tried to extract objects from the main project from a subproject.')
        if (self.subdir.split('/')[1] != buildtarget.subdir.split('/')[1]):
            raise InterpreterException('Tried to extract objects from a different subproject.')