def extract_incdirs(self, kwargs):
    prospectives = unholder(extract_as_list(kwargs, 'include_directories'))
    result = []
    for p in prospectives:
        if isinstance(p, build.IncludeDirs):
            result.append(p)
        elif isinstance(p, str):
            result.append(self.build_incdir_object([p]).held_object)
        else:
            raise InterpreterException('Include directory objects can only be created from strings or include directories.')
    return result
def extract_incdirs(self, kwargs):
    prospectives = unholder(extract_as_list(kwargs, 'include_directories'))
    result = []
    for p in prospectives:
        if isinstance(p, build.IncludeDirs):
            result.append(p)
        elif isinstance(p, str):
            result.append(self.build_incdir_object([p]).held_object)
        else:
            raise InterpreterException('Include directory objects can only be created from strings or include directories.')
    return result