docs: def _complete_url(self, text, tld_pos, tld):
          """
          Expand string in both sides to match whole URL.
  
          :param str text: text where we want to find URL
          :param int tld_pos: position of TLD
          :param str tld: matched TLD which should be in text
          :return: returns URL
          :rtype: str
          """
  
          left_ok = True
          right_ok = True
  
          max_len = len(text) - 1
          end_pos = tld_pos
          start_pos = tld_pos
          while left_ok or right_ok:
              if left_ok:
                  if start_pos <= 0:
                      left_ok = False
                  else:
                      if text[start_pos - 1] not in self._stop_chars_left:
                          start_pos -= 1
                      else:
                          left_ok = False
              if right_ok:
                  if end_pos >= max_len:
                      right_ok = False
                  else:
                      if text[end_pos + 1] not in self._stop_chars_right:
                          end_pos += 1
                      else:
                          right_ok = False
  
          complete_url = text[start_pos:end_pos + 1].lstrip('/')
          # remove last character from url
          # when it is allowed character right after TLD (e.g. dot, comma)
          temp_tlds = {tld + c for c in self._after_tld_chars}
          # get only dot+tld+one_char and compare
          if complete_url[len(complete_url)-len(tld)-1:] in temp_tlds:
              complete_url = complete_url[:-1]
  
          complete_url = self._split_markdown(complete_url, tld_pos-start_pos)
          complete_url = self._remove_enclosure_from_url(
              complete_url, tld_pos-start_pos, tld)
          if not self._is_domain_valid(complete_url, tld):
              return ""
  
          return complete_url