<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_mapped_permissions_for(brain_or_object):
 """Get the mapped permissions for the given object A mapped permission is one that is used in the object. Each permission string, e.g. "senaite.core: Field: Edit Analysis Remarks" is translated by the function `AccessControl.Permission.pname` to a valid attribute name: _Field__Edit_Result_Permission This attribute is looked up in the object by `getPermissionMapping`: ("Manager", "Sampler") Therefore, only those permissions which have roles mapped on the object or by objects within the acquisition chain are considered. Code extracted from `IRoleManager.manage_getUserRolesAndPermissions` :param brain_or_object: Catalog brain or object :returns: List of permissions """

    obj = api.get_object(brain_or_object)
    mapping = obj.manage_getPermissionMapping()
    return map(lambda item: item["permission_name"], mapping)