nodes: 0, module; 1, function_definition; 2, function_name:get_schemaloc_string; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, if_statement; 11, if_statement; 12, expression_statement; 13, for_statement; 14, if_statement; 15, return_statement; 16, identifier:ns_uris; 17, None; 18, identifier:sort; 19, False; 20, identifier:delim; 21, string:"\n"; 22, comment:"""Constructs and returns a schemalocation attribute.  If no
          namespaces in this set have any schema locations defined, returns
          an empty string.
  
          Args:
              ns_uris (iterable): The namespaces to include in the constructed
                  attribute value.  If None, all are included.
              sort (bool): Whether the sort the namespace URIs.
              delim (str): The delimiter to use between namespace/schemaloc
                  *pairs*.
  
          Returns:
              str: A schemalocation attribute in the format:
                  ``xsi:schemaLocation="nsuri schemaloc<delim>nsuri2 schemaloc2<delim>..."``
  
          """; 23, not_operator; 24, block; 25, identifier:sort; 26, block; 27, assignment; 28, identifier:ns_uri; 29, identifier:ns_uris; 30, block; 31, not_operator; 32, block; 33, call; 34, identifier:ns_uris; 35, expression_statement; 36, expression_statement; 37, identifier:schemalocs; 38, list; 39, expression_statement; 40, if_statement; 41, identifier:schemalocs; 42, return_statement; 43, attribute; 44, argument_list; 45, assignment; 46, assignment; 47, assignment; 48, attribute; 49, block; 50, string:""; 51, string:'xsi:schemaLocation="{0}"'; 52, identifier:format; 53, call; 54, identifier:ns_uris; 55, call; 56, identifier:ns_uris; 57, call; 58, identifier:ni; 59, call; 60, identifier:ni; 61, identifier:schema_location; 62, expression_statement; 63, attribute; 64, argument_list; 65, attribute; 66, argument_list; 67, identifier:sorted; 68, argument_list; 69, attribute; 70, argument_list; 71, call; 72, identifier:delim; 73, identifier:join; 74, identifier:schemalocs; 75, identifier:six; 76, identifier:iterkeys; 77, attribute; 78, identifier:ns_uris; 79, identifier:self; 80, identifier:__lookup_uri; 81, identifier:ns_uri; 82, attribute; 83, argument_list; 84, identifier:self; 85, identifier:__ns_uri_map; 86, identifier:schemalocs; 87, identifier:append; 88, call; 89, attribute; 90, argument_list; 91, string:"{0.uri} {0.schema_location}"; 92, identifier:format; 93, identifier:ni
code: def get_schemaloc_string(self, ns_uris=None, sort=False, delim="\n"):
          """Constructs and returns a schemalocation attribute.  If no
          namespaces in this set have any schema locations defined, returns
          an empty string.
  
          Args:
              ns_uris (iterable): The namespaces to include in the constructed
                  attribute value.  If None, all are included.
              sort (bool): Whether the sort the namespace URIs.
              delim (str): The delimiter to use between namespace/schemaloc
                  *pairs*.
  
          Returns:
              str: A schemalocation attribute in the format:
                  ``xsi:schemaLocation="nsuri schemaloc<delim>nsuri2 schemaloc2<delim>..."``
  
          """
          if not ns_uris:
              ns_uris = six.iterkeys(self.__ns_uri_map)
  
          if sort:
              ns_uris = sorted(ns_uris)
  
          schemalocs = []
  
          for ns_uri in ns_uris:
              ni = self.__lookup_uri(ns_uri)
  
              if ni.schema_location:
                  schemalocs.append("{0.uri} {0.schema_location}".format(ni))
  
          if not schemalocs:
              return ""
  
          return 'xsi:schemaLocation="{0}"'.format(delim.join(schemalocs))