class_docstr: Matches requests from hosts specified by ``host_pattern`` regex.
class_docstr_tok: ["Matches","requests","from","hosts","specified","by","``","host_pattern","``","regex","."]
code: def __init__(self, host_pattern):
      if isinstance(host_pattern, basestring_type):
          if not host_pattern.endswith("$"):
              host_pattern += "$"
          self.host_pattern = re.compile(host_pattern)
      else:
          self.host_pattern = host_pattern
  
imports: from __future__ import absolute_import, division, print_function
  import re
  from functools import partial
  from tornado import httputil
  from tornado.httpserver import _CallableAdapter
  from tornado.escape import url_escape, url_unescape, utf8
  from tornado.log import app_log
  from tornado.util import basestring_type, import_object, re_unescape, unicode_type
label_desc: Use image node_id 1 to create a new HostMatches object from inherited base classes: Matcher with example: obj = HostMatches(host_pattern)