code: def get_al_samples_random(self, existing_al_ids):
      save_me = {}
      for datatype in ["train", "valid", "test"]:
          unfiltered_episodes = self.get_gsgd_episodes_for_datatype(
              datatype
          )
          filtered_episodes = [
              x
              for x in unfiltered_episodes
              if x.extras["dialogue_id"] not in existing_al_ids
          ]
          samples = random.Random(42).sample(
              filtered_episodes, self.opt["num_apis_to_get"]
          )
          if self.opt["cumulative_al"]:
              old = [
                  x
                  for x in unfiltered_episodes
                  if x.extras["dialogue_id"] in existing_al_ids
              ]
              samples.extend(old)
          save_me[datatype] = {
              episode.extras["dialogue_id"]: episode.goal_calls_utt
              for episode in samples
          }
      return save_me
  
imports: from parlai.core.params import ParlaiParser
  from parlai.core.script import ParlaiScript, register_script
  from parlai.tasks.google_sgd_simulation_splits.agents import GoogleSgdOutDomainParser
  from parlai.core.tod.tod_agents import TodStructuredDataParser
  import parlai
  import os
  import json
  import random
label_desc: Use image node_id 3 for calling the GetAlSamplesForGsgdScript obj's underlying member method code with example usage: obj.get_al_samples_random(existing_al_ids) and returns: save_me