class_docstr: An API to get information about the current user
docstr: Get the user roles corresponding to the agent making the request.
  ---
  get:
    summary: Get the user roles
    description: >-
      Gets the user roles corresponding to the agent making the request,
      or returns a 401 error if the user is unauthenticated.
    responses:
      200:
        description: The current user
        content:
          application/json:
            schema:
              type: object
              properties:
                result:
                  $ref: '#/components/schemas/UserResponseSchema'
      401:
        $ref: '#/components/responses/401'
code: def get_my_roles(self) -> Response:
      """Get the user roles corresponding to the agent making the request.
      ---
      get:
        summary: Get the user roles
        description: >-
          Gets the user roles corresponding to the agent making the request,
          or returns a 401 error if the user is unauthenticated.
        responses:
          200:
            description: The current user
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    result:
                      $ref: '#/components/schemas/UserResponseSchema'
          401:
            $ref: '#/components/responses/401'
      """
      try:
          if g.user is None or g.user.is_anonymous:
              return self.response_401()
      except NoAuthorizationError:
          return self.response_401()
      user = bootstrap_user_data(g.user, include_perms=True)
      return self.response(200, result=user)
  
file_path: superset/superset/views/users/api.py
imports: from flask import g, Response
  from flask_appbuilder.api import expose, safe
  from flask_jwt_extended.exceptions import NoAuthorizationError
  from superset.views.base_api import BaseSupersetApi
  from superset.views.users.schemas import UserResponseSchema
  from superset.views.utils import bootstrap_user_data
label_desc: Use image node_id 2 for calling the CurrentUserRestApi obj's underlying member method code with example usage: obj.get_my_roles() and returns: self, self, self