code: def main():
      parser = argparse.ArgumentParser(
          description="Profiling distributions library using various"
          "tools."
      )
      parser.add_argument(
          "--tool",
          nargs="?",
          default="timeit",
          help="Profile using tool. One of following should be specified:"
          ' ["timeit", "cprofile"]',
      )
      parser.add_argument(
          "--batch_sizes",
          nargs="*",
          type=int,
          help="Batch size of tensor - max of 4 values allowed. "
          "Default = [10000, 100000]",
      )
      parser.add_argument(
          "--dists",
          nargs="*",
          type=str,
          help="Run tests on distributions. One or more of following distributions "
          'are supported: ["bernoulli, "beta", "categorical", "dirichlet", '
          '"normal", "lognormal", "halfcauchy", "cauchy", "exponential", '
          '"poisson", "one_hot_categorical", "gamma", "uniform"] '
          "Default - Run profiling on all distributions",
      )
      parser.add_argument(
          "--repeat",
          nargs="?",
          default=5,
          type=int,
          help='When profiling using "timeit", the number of repetitions to '
          "use for the profiled function. default=5. The minimum value "
          "is reported.",
      )
      args = parser.parse_args()
      set_tool_cfg(args)
      dists = args.dists
      batch_sizes = args.batch_sizes
      if not args.batch_sizes:
          batch_sizes = [10000, 100000]
      if len(batch_sizes) >= 4:
          raise ValueError("Max of 4 batch sizes can be specified.")
      if not dists:
          dists = sorted(DISTRIBUTIONS.keys())
      run_with_tool(args.tool, dists, batch_sizes)
  
file_path: pyro/profiler/distributions.py
imports: import argparse
  import torch
  from torch.autograd import Variable
  from profiler.profiling_utils import Profile, profile_print
  from pyro.distributions import Bernoulli, Beta, Categorical, Cauchy, Dirichlet, Exponential, Gamma, LogNormal, Normal, OneHotCategorical, Poisson, Uniform
label_desc: Use image node_id 8 for calling a global function with example usage: main() without return types