def METHOD_NAME(self, code, cursor_pos=None, detail_level=0):
    """Get code inspection."""
    if cursor_pos is None:
        cursor_pos = len(code)
    content = dict(
        code=code,
        cursor_pos=cursor_pos,
        detail_level=detail_level,
    )
    msg = self.session.msg("inspect_request", content)
    self._dispatch_to_kernel(msg)
    return msg["header"]["msg_id"]