def METHOD_NAME(self):
    """Get a `PyModule`"""
    msg = None
    code = self.code
    tries = 0
    while True:
        try:
            if (
                tries == 0
                and self.resource is not None
                and self.resource.read() == code
            ):
                return self.project.METHOD_NAME(self.resource, force_errors=True)
            return libutils.get_string_module(
                self.project, code, resource=self.resource, force_errors=True
            )
        except exceptions.ModuleSyntaxError as e:
            if msg is None:
                msg = f"{e.filename}:{e.lineno} {e.message_}"
            if tries < self.maxfixes:
                tries += 1
                self.commenter.comment(e.lineno)
                code = "\n".join(self.commenter.lines)
            else:
                raise exceptions.ModuleSyntaxError(
                    e.filename, e.lineno, f"Failed to fix error: {msg}"
                )