code: def has_path(self, path, method=None):
          
          method = self._normalize_method_name(method)
  
          path_dict = self.get_path(path)
          path_dict_exists = path_dict is not None
          if method:
              return path_dict_exists and method in path_dict
          return path_dict_exists
docs: Returns True if this Swagger has the given path and optional method
  
          :param string path: Path name
          :param string method: HTTP method
          :return: True, if this path/method is present in the document