code: def load_news_programmatic_labeling():
      print("Loading News-programmatic-labeling dataset")
  
      # Read and load dataset from Hub
      dataset_rg = rg.read_datasets(
          load_dataset("argilla/agnews_weak_labeling", split="train"),
          task="TextClassification",
      )
  
      # Define labeling schema to avoid UI user modification
      settings = rg.TextClassificationSettings(
          label_schema={"World", "Sports", "Sci/Tech", "Business"}
      )
      rg.configure_dataset(
          name="news-programmatic-labeling", settings=settings
      )
  
      # Log the dataset
      rg.log(
          dataset_rg,
          name="news-programmatic-labeling",
          tags={
              "description": "The AG News with programmatic labeling rules (see weak labeling mode in the UI)."
          },
      )
  
      # Define queries and patterns for each category (using Elasticsearch DSL)
      queries = [
          (["money", "financ*", "dollar*"], "Business"),
          (["war", "gov*", "minister*", "conflict"], "World"),
          (["*ball", "sport*", "game", "play*"], "Sports"),
          (
              ["sci*", "techno*", "computer*", "software", "web"],
              "Sci/Tech",
          ),
      ]
  
      # Define rules
      rules = [
          Rule(query=term, label=label)
          for terms, label in queries
          for term in terms
      ]
  
      # Add rules to the dataset
      add_rules(dataset="news-programmatic-labeling", rules=rules)
  
file_path: argilla/docker/scripts/load_data.py
imports: import sys
  import time
  from typing import Union
  import argilla
  import pandas
  import requests
  from argilla.labeling.text_classification import Rule, add_rules
  from datasets import load_dataset
label_desc: Use image node_id 4 for calling the LoadDatasets obj's underlying member method code with example usage: obj.load_news_programmatic_labeling() without return types