code: def __init__(self, include=None, exclude=None):
      # type: (Optional[Union[str, List[str]]], Optional[Union[str, List[str]]]) -> ()
      # Either `include` or `exclude` should be specified, but not both
      if include is not None and exclude is not None:
          raise ValueError(
              "Specify either 'include' or 'exclude', not both!"
          )
      include = include or list()
      if isinstance(include, str):
          include = [include]
      exclude = exclude or list()
      if isinstance(exclude, str):
          exclude = [exclude]
      res = Task._get_default_session().send_request("users", "get_all")
      if not res.ok:
          raise RuntimeError("Cannot get list of all users!")
      all_users = {
          d["name"]: d["id"] for d in res.json()["data"]["users"]
      }
      for user in include + exclude:
          if user not in all_users:
              print(
                  f"Cannot translate user '{user}' to any known user ID - "
                  f"will use it verbatim"
              )
      self.include = [
          all_users.get(user, user) for user in include
      ]  # Map usernames to user IDs
      self.exclude = [all_users.get(user, user) for user in exclude]
  
file_path: clearml/examples/services/monitoring/slack_alerts.py
imports: import argparse
  import os
  from pathlib import Path
  from time import sleep
  from typing import Optional, Callable, List, Union
  from slack_sdk import WebClient
  from slack_sdk.errors import SlackApiError
  from clearml import Task
  from clearml.automation.monitor import Monitor
label_desc: Use image node_id 1 to create a new UserFilter object  with example: obj = UserFilter(include, exclude)