code: def _remove_enclosure_from_url(self, text_url, tld_pos, tld):
          
  
          enclosure_map = {
              left_char: right_char
              for left_char, right_char in self._enclosure
          }
          # get position of most right left_char of enclosure pairs
          left_pos = max([
              text_url.rfind(left_char, 0, tld_pos)
              for left_char in enclosure_map.keys()
          ])
          left_char = text_url[left_pos] if left_pos >= 0 else ''
          right_char = enclosure_map.get(left_char, '')
          right_pos = text_url.rfind(right_char) if right_char else len(text_url)
          if right_pos < 0 or right_pos < tld_pos:
              right_pos = len(text_url)
  
          new_url = text_url[left_pos + 1:right_pos]
          tld_pos -= left_pos + 1
  
          # Get valid domain when we have input as: example.com)/path
          # we assume that if there is enclosure character after TLD it is
          # the end URL it self therefore we remove the rest
          after_tld_pos = tld_pos + len(tld)
          if after_tld_pos < len(new_url):
              if new_url[after_tld_pos] in enclosure_map.values():
                  new_url_tmp = new_url[:after_tld_pos]
                  return self._remove_enclosure_from_url(
                      new_url_tmp, tld_pos, tld)
  
          return new_url
docs: Removes enclosure characters from URL given in text_url.
          For example: (example.com) -> example.com
  
          :param str text_url: text with URL that we want to extract from
          enclosure of two characters
          :param int tld_pos: position of TLD in text_url
          :param str tld: matched TLD which should be in text
          :return: URL that has removed enclosure
          :rtype: str