code: def infer_paths(output_dir, **subdirs):
      """Infers standard paths to policy and model directories.
  
      Example:
        >>> infer_paths("/some/output/dir/", policy="", model="custom/path")
        {"policy": "/some/output/dir/policy", "model": "custom/path",
        "output_dir":"/some/output/dir/"}
  
      Args:
        output_dir: output directory.
        **subdirs: sub-directories.
  
      Returns:
        a dictionary with the directories.
      """
      directories = {}
      for name, path in six.iteritems(subdirs):
          directories[name] = (
              path if path else os.path.join(output_dir, name)
          )
      directories["output_dir"] = output_dir
      return directories
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import os
  import re
  import gym
  import numpy
  import six
  from tensor2tensor.models.research.rl import get_policy
  from tensor2tensor.models.research.rl import make_simulated_env_fn_from_hparams
  from tensor2tensor.rl import rl_utils
  from tensor2tensor.rl.envs.simulated_batch_gym_env import FlatBatchEnv
  from tensor2tensor.utils import hparam
  from tensor2tensor.utils import trainer_lib
  from tensor2tensor.utils.misc_utils import camelcase_to_snakecase
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling a global function with example usage: infer_paths(output_dir) and returns: directories