docs: def get_processes(process_dir, base_source_uri):
      """Find processes in path.
  
      :param str process_dir: Path to the directory where to search for processes
      :param str base_source_uri: Base URL of the source code repository with process definitions
      :return: Dictionary of processes where keys are URLs pointing to processes'
      source code and values are processes' definitions parsed from YAML files
      :rtype: dict
      :raises: ValueError: if multiple processes with the same slug are found
  
      """
      global PROCESS_CACHE  # pylint: disable=global-statement
      if PROCESS_CACHE is not None:
          return PROCESS_CACHE
  
      all_process_files = []
      process_file_extensions = ['*.yaml', '*.yml']
      for root, _, filenames in os.walk(process_dir):
          for extension in process_file_extensions:
              for filename in fnmatch.filter(filenames, extension):
                  all_process_files.append(os.path.join(root, filename))
  
      def read_yaml_file(fname):
          """Read the yaml file."""
          with open(fname) as f:
              return yaml.load(f, Loader=yaml.FullLoader)
  
      processes = []
      for process_file in all_process_files:
          processes_in_file = read_yaml_file(process_file)
          for process in processes_in_file:
              # This section finds the line in file where the
              # defintion of the process starts. (there are
              # multiple process definition in some files).
              startline = get_process_definition_start(process_file, process['slug'])
  
              # Put together URL to starting line of process definition.
              process['source_uri'] = base_source_uri + process_file[len(process_dir) + 1:] + '#L' + str(startline)
  
              if 'category' not in process:
                  process['category'] = 'uncategorized'
  
              processes.append(process)
  
      PROCESS_CACHE = processes
      return processes