def METHOD_NAME(self, *args, **options):
    # Retrieving the arguments
    permissions_name = options.get("permission").replace(" ", "")
    resources_pk = [x.replace(" ", "") for x in options.get("resources", [])]
    if resources_pk:
        resources_pk = resources_pk[0].split(",")
    else:
        resources_pk = [x for x in Dataset.objects.values_list('pk', flat=True)]
    users_usernames = [x.replace(" ", "") for x in options.get("users", [])]
    if users_usernames:
        users_usernames = users_usernames[0].split(",")
    groups_names = [x.replace(" ", "") for x in options.get("groups", [])]
    if groups_names:
        groups_names = groups_names[0].split(",")
    delete_flag = options.get("delete_flag")
    if isinstance(permissions_name, list):
        # it accept one kind of permission per request
        raise Exception("Only one permission name must be specified")
    if not users_usernames and not groups_names:
        raise Exception("Groups or Usernames must be specified")
    set_datasets_permissions(
        permissions_name,
        resources_names=resources_pk,
        users_usernames=users_usernames,
        groups_names=groups_names,
        delete_flag=delete_flag
    )