def METHOD_NAME(id):
    """Retrieve role details.
    ---
    post:
      summary: Retrieve role details
      description: >
        Fetch detailed information about a role that the user is
        entitled to access, e.g. their own role, or a group they
        are part of.
      parameters:
      - in: path
        name: id
        required: true
        description: role ID
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
      tags:
      - Role
    """
    role = obj_or_404(Role.by_id(id))
    require(request.authz.can_read_role(role.id))
    data = role.to_dict()
    if request.authz.can_write_role(role.id):
        data.update(get_deep_role(role))
    return RoleSerializer.jsonify(data)