original_docstring: 
          Factory method for creating SavedSource instance.
          :param saved_source_id: Id of the saved source in the kibana.doc index.
          :return: SavedSource instance.
          
docstring: Factory method for creating SavedSource instance.
docstring_tokens: Factory method for creating SavedSource instance .
code: def create(self, saved_source_id):
          """
          Factory method for creating SavedSource instance.
          :param saved_source_id: Id of the saved source in the kibana.doc index.
          :return: SavedSource instance.
          """
          raw_saved_source_data = self.es.get(index='.kibana', doc_type='doc', id=saved_source_id)
  
          saved_source_type = raw_saved_source_data['_source']['type']
  
          if saved_source_type == 'search':
              return SavedSearch(saved_source_id, self.conf)
          elif saved_source_type == 'visualization':
              return SavedVisualization(saved_source_id, self.conf)
          else:
              # TODO: Raise some exception.
              pass
code_tokens: def create ( self , saved_source_id ) : raw_saved_source_data = self . es . get ( index = '.kibana' , doc_type = 'doc' , id = saved_source_id ) saved_source_type = raw_saved_source_data [ '_source' ] [ 'type' ] if saved_source_type == 'search' : return SavedSearch ( saved_source_id , self . conf ) elif saved_source_type == 'visualization' : return SavedVisualization ( saved_source_id , self . conf ) else : pass
short_docstring: Factory method for creating SavedSource instance.
short_docstring_tokens: Factory method for creating SavedSource instance .
comment: """
          Factory method for creating SavedSource instance.
          :param saved_source_id: Id of the saved source in the kibana.doc index.
          :return: SavedSource instance.
          """$SEP$# TODO: Raise some exception.