code: def grant_local_roles_for(brain_or_object, roles, user=None):
      
      user_id = get_user_id(user)
      obj = api.get_object(brain_or_object)
  
      if isinstance(roles, basestring):
          roles = [roles]
  
      obj.manage_addLocalRoles(user_id, roles)
      return get_local_roles_for(brain_or_object)
docs: Grant local roles for the object
  
      Code extracted from `IRoleManager.manage_addLocalRoles`
  
      :param brain_or_object: Catalog brain or object
      :param user: A user ID, user object or None (for the current user)
      :param roles: The local roles to grant for the current user