code: def uniquify_str(str_, str_set):
      """Uniquifies :attr:`str_` if :attr:`str_` is included in :attr:`str_set`.
  
      This is done by appending a number to :attr:`str_`. Returns
      :attr:`str_` directly if it is not included in :attr:`str_set`.
  
      Args:
          str_ (string): A string to uniquify.
          str_set (set, dict, or list): A collection of strings. The returned
              string is guaranteed to be different from the elements in the
              collection.
  
      Returns:
          The uniquified string. Returns :attr:`str_` directly if it is
          already unique.
  
      Example:
  
          .. code-block:: python
  
              print(uniquify_str('name', ['name', 'name_1']))
              # 'name_2'
  
      """
      if str_ not in str_set:
          return str_
      else:
          for i in range(1, len(str_set) + 1):
              unique_str = str_ + "_%d" % i
              if unique_str not in str_set:
                  return unique_str
      raise ValueError("Fails to uniquify string: " + str_)
  
imports: from typing import List, Union
  import inspect
  import funcsigs
  from pydoc import locate
  import copy
  import collections
  import numpy
  import tensorflow
  from texar.tf.hyperparams import HParams
  from texar.tf.utils.dtypes import is_str, is_callable, compat_as_text, _maybe_list_to_array
label_desc: Use image node_id 20 for calling a global function with example usage: uniquify_str(str_, str_set) and returns: str_, unique_str