nodes: 0, module; 1, function_definition; 2, function_name:get_domain_listing; 3, parameters; 4, block; 5, identifier:self; 6, identifier:domain; 7, default_parameter; 8, default_parameter; 9, list_splat_pattern; 10, dictionary_splat_pattern; 11, expression_statement; 12, comment:# Verify arguments; 13, if_statement; 14, if_statement; 15, if_statement; 16, expression_statement; 17, if_statement; 18, if_statement; 19, return_statement; 20, identifier:sort; 21, string; 22, identifier:period; 23, None; 24, identifier:args; 25, identifier:kwargs; 26, comment:"""Return a get_content generator for submissions by domain.
  
          Corresponds to the submissions provided by
          ``https://www.reddit.com/domain/{domain}``.
  
          :param domain: The domain to generate a submission listing for.
          :param sort: When provided must be one of 'hot', 'new', 'rising',
              'controversial, 'gilded', or 'top'. Defaults to 'hot'.
          :param period: When sort is either 'controversial', or 'top' the period
              can be either None (for account default), 'all', 'year', 'month',
              'week', 'day', or 'hour'.
  
          The additional parameters are passed directly into
          :meth:`.get_content`. Note: the `url` parameter cannot be altered.
  
          """; 27, comparison_operator:sort not in ('controversial', 'hot', 'new', 'rising', 'top',
                          'gilded'); 28, block; 29, comparison_operator:period not in (None, 'all', 'day', 'hour', 'month', 'week', 'year'); 30, block; 31, boolean_operator; 32, block; 33, assignment; 34, comparison_operator:sort != 'hot'; 35, block; 36, identifier:period; 37, comment:# Set or overwrite params 't' parameter; 38, block; 39, call; 40, string_content:hot; 41, identifier:sort; 42, tuple; 43, raise_statement; 44, identifier:period; 45, tuple; 46, raise_statement; 47, comparison_operator:sort not in ('controversial', 'top'); 48, identifier:period; 49, raise_statement; 50, identifier:url; 51, call; 52, identifier:sort; 53, string; 54, expression_statement; 55, expression_statement; 56, attribute; 57, argument_list; 58, string; 59, string; 60, string; 61, string; 62, string; 63, string; 64, call; 65, None; 66, string; 67, string; 68, string; 69, string; 70, string; 71, string; 72, call; 73, identifier:sort; 74, tuple; 75, call; 76, attribute; 77, argument_list; 78, string_content:hot; 79, augmented_assignment; 80, assignment; 81, identifier:self; 82, identifier:get_content; 83, identifier:url; 84, list_splat; 85, dictionary_splat; 86, string_content:controversial; 87, string_content:hot; 88, string_content:new; 89, string_content:rising; 90, string_content:top; 91, string_content:gilded; 92, identifier:TypeError; 93, argument_list; 94, string_content:all; 95, string_content:day; 96, string_content:hour; 97, string_content:month; 98, string_content:week; 99, string_content:year; 100, identifier:TypeError; 101, argument_list; 102, string; 103, string; 104, identifier:TypeError; 105, argument_list; 106, subscript; 107, identifier:format; 108, keyword_argument; 109, identifier:url; 110, identifier:sort; 111, subscript; 112, identifier:period; 113, identifier:args; 114, identifier:kwargs; 115, string; 116, string; 117, string_content:controversial; 118, string_content:top; 119, string; 120, attribute; 121, string; 122, identifier:domain; 123, identifier:domain; 124, call; 125, string; 126, string_content:Invalid sort parameter.; 127, string_content:Invalid period parameter.; 128, string_content:Period cannot be set for that sort argument.; 129, identifier:self; 130, identifier:config; 131, string_content:domain; 132, attribute; 133, argument_list; 134, string_content:t; 135, identifier:kwargs; 136, identifier:setdefault; 137, string; 138, dictionary; 139, string_content:params
code: def get_domain_listing(self, domain, sort='hot', period=None, *args,
                             **kwargs):
          """Return a get_content generator for submissions by domain.
  
          Corresponds to the submissions provided by
          ``https://www.reddit.com/domain/{domain}``.
  
          :param domain: The domain to generate a submission listing for.
          :param sort: When provided must be one of 'hot', 'new', 'rising',
              'controversial, 'gilded', or 'top'. Defaults to 'hot'.
          :param period: When sort is either 'controversial', or 'top' the period
              can be either None (for account default), 'all', 'year', 'month',
              'week', 'day', or 'hour'.
  
          The additional parameters are passed directly into
          :meth:`.get_content`. Note: the `url` parameter cannot be altered.
  
          """
          # Verify arguments
          if sort not in ('controversial', 'hot', 'new', 'rising', 'top',
                          'gilded'):
              raise TypeError('Invalid sort parameter.')
          if period not in (None, 'all', 'day', 'hour', 'month', 'week', 'year'):
              raise TypeError('Invalid period parameter.')
          if sort not in ('controversial', 'top') and period:
              raise TypeError('Period cannot be set for that sort argument.')
  
          url = self.config['domain'].format(domain=domain)
          if sort != 'hot':
              url += sort
          if period:  # Set or overwrite params 't' parameter
              kwargs.setdefault('params', {})['t'] = period
          return self.get_content(url, *args, **kwargs)