code: def get_local_roles_for(brain_or_object, user=None):
      
      user_id = get_user_id(user)
      obj = api.get_object(brain_or_object)
      return sorted(obj.get_local_roles_for_userid(user_id))
docs: Get the local defined roles on the context
  
      Code extracted from `IRoleManager.get_local_roles_for_userid`
  
      :param brain_or_object: Catalog brain or object
      :param user: A user ID, user object or None (for the current user)
      :returns: List of granted local roles on the given object