parameters: (aset, type_args, defaults: bool=False)
docstring: Given a python set-like collection, potentially containing Thrift Structs
      and recursively parsing the elements
      :param aset: a set
      :param defaults: return default values
      :return: Set
docstring_summary: Given a python set-like collection, potentially containing Thrift Structs
      and recursively parsing the elements
      :param aset: a set
      :param defaults: return default values
      :return: Set
docstring_tokens: Given a python set - like collection potentially containing Thrift Structs and recursively parsing the elements : param aset : a set : param defaults : return default values : return : Set
function: def __set_to_dict(aset, type_args, defaults: bool=False):
      """
      Given a python set-like collection, potentially containing Thrift Structs
      and recursively parsing the elements
      :param aset: a set
      :param defaults: return default values
      :return: Set
      """
      if not aset:
          return aset
  
      element_type = type_args[0]
      if element_type == TType.STRUCT:
          return {struct_to_dict(element, defaults=defaults) for element in aset}
      if element_type == TType.LIST:
          return {
              __list_to_dict(element, type_args[1], defaults=defaults)
              for element in aset
          }
      if element_type == TType.SET:
          return {
              __set_to_dict(element, type_args[1], defaults=defaults) for element in aset
          }
      else:
          return aset
function_tokens: def __set_to_dict ( aset , type_args , defaults : bool = False ) : if not aset : return aset element_type = type_args [ 0 ] if element_type == TType . STRUCT : return { struct_to_dict ( element , defaults = defaults ) for element in aset } if element_type == TType . LIST : return { __list_to_dict ( element , type_args [ 1 ] , defaults = defaults ) for element in aset } if element_type == TType . SET : return { __set_to_dict ( element , type_args [ 1 ] , defaults = defaults ) for element in aset } else : return aset