def sample_parameters(seed: int | None = None):
  """Samples a set of parameters for the world configuration."""
  seed = seed if seed is not None else random.getrandbits(63)

  config = haggling.WorldConfig(
      year=YEAR,
      location="Fruitville",
      premise=SCENARIO_PREMISE,
      scene_visuals=VISUAL_SCENE_OPENINGS,
      random_seed=seed,
  )

  all_names = list(MALE_NAMES) + list(FEMALE_NAMES)
  rng = random.Random(config.random_seed)
  rng.shuffle(all_names)
  config.people = all_names

  for _, name in enumerate(MALE_NAMES):
    config.person_data[name] = {"gender": "male"}
  for _, name in enumerate(FEMALE_NAMES):
    config.person_data[name] = {"gender": "female"}

  return config
Samples a set of parameters for the world configuration.
examples/deprecated/modular/environment/modules/fruitville_haggling.py