code: def validate_monitor_tasks(dependencies, args):
      
      # Make a list of all task configurations needed to supervise
      sup_configs = sorted(dependencies.keys())
  
  
      try:
          logging.info("Validating supervisor data...")
          # Make an api call to list task configurations in the workspace
          r = fapi.list_workspace_configs(args['project'], args['workspace'])
          fapi._check_response_code(r, 200)
          space_configs = r.json()
  
          # Make a dict for easy lookup later
          space_configs = { c["name"]: c for c in space_configs}
  
          # Also make an api call to list methods you have view permissions for
          r = fapi.list_repository_methods()
          fapi._check_response_code(r, 200)
          repo_methods = r.json()
  
          ## Put in a form that is more easily searchable: namespace/name:snapshot
          repo_methods = {m['namespace'] + '/' + m['name'] + ':' + str(m['snapshotId'])
                          for m in repo_methods if m['entityType'] == 'Workflow'}
  
          valid = True
  
          for config in sup_configs:
              # ensure config exists in the workspace
              if config not in space_configs:
                  logging.error("No task configuration for "
                                + config + " found in " + args['project'] + "/"
                                + args['workspace'])
                  valid = False
              else:
                  # Check access permissions for the referenced method
                  m = space_configs[config]['methodRepoMethod']
                  ref_method = m['methodNamespace'] + "/" + m['methodName'] + ":" + str(m['methodVersion'])
                  if ref_method not in repo_methods:
                      logging.error(config+ " -- You don't have permisson to run the referenced method: "
                                    + ref_method)
                      valid = False
  
      except Exception as e:
          logging.error("Exception occurred while validating supervisor: " + str(e))
          raise
          return False
  
      return valid
docs: Validate that all entries in the supervisor are valid task configurations and
          that all permissions requirements are satisfied.