def METHOD_NAME(inst, basedn, log, args):
    dn = _get_dn_arg(args.dn, msg="Enter dn to check")
    roles = Roles(inst, basedn)
    try:
        role = roles.get(dn=dn)
    except ldap.NO_SUCH_OBJECT:
        raise ValueError("Role \"{}\" is not found or the entry is not a role.".format(dn))
    status = role.status()
    info_dict = {}
    if args.json:
        info_dict["dn"] = dn
        info_dict["state"] = f'{status["state"].describe(status["role_dn"])}'
        log.info(json.dumps({"type": "status", "info": info_dict}, indent=4))
    else:
        log.info(f'Entry DN: {dn}')
        log.info(f'Entry State: {status["state"].describe(status["role_dn"])}\n')