def METHOD_NAME(self, app, cache) -> None:
    self._get_mpid_cache()
    @cache.memoize(timeout=0)
    def get_human_readable_results_from_search_term(search_term):
        # common confusables
        if search_term.isnumeric() and str(int(search_term)) == search_term:
            search_term = f"mp-{search_term}"
        if search_term.startswith("mp") and "-" not in search_term:
            search_term = f"mp-{search_term.split('mp')[1]}"
        if search_term.startswith(("mp-", "mvc-")):
            # no need to actually search, support multiple mp-ids (space separated)
            return {mpid: mpid for mpid in search_term.split(" ")}
        fields = ["material_id", "formula_pretty", "energy_above_hull", "symmetry"]
        with MPRester() as mpr:
            try:
                entries = mpr.summary.search_summary_docs(
                    formula=search_term, fields=fields
                )
            except MPRestError:
                entries = []
        if len(entries) == 0:
            self.logger.info(f"Search: no results for {search_term}")
            return {"error": f"No results found for {search_term}."}
        entries = sorted(entries, key=lambda x: x.energy_above_hull)
        human_readable_hull_labels = []
        for entry in entries:
            e_hull = entry.energy_above_hull
            if e_hull == 0:
                human_readable_hull_labels.append("predicted stable phase")
            elif e_hull >= 0.01:
                human_readable_hull_labels.append(f"+{e_hull:.2f} eV/atom")
            else:
                e_hull_str = np.format_float_scientific(e_hull, precision=2)
                human_readable_hull_labels.append(f"+{e_hull_str} eV/atom")
        return {
            entry.material_id: f"{unicodeify(entry.formula_pretty)} "
            f"({unicodeify_spacegroup(entry.symmetry.symbol)}) "
            f"{human_readable_hull_label}"
            for entry, human_readable_hull_label in zip(
                entries, human_readable_hull_labels
            )
        }
    @app.callback(
        Output(self.id("results"), "data"),
        Input(self.id("input"), "n_submit"),
        Input(self.id("button"), "n_clicks"),
        State(self.id("input"), "value"),
    )
    def update_results(n_submit, n_clicks, search_term):
        if not search_term:
            raise PreventUpdate
        self.logger.info(f"Search: {search_term}")
        results = get_human_readable_results_from_search_term(search_term)
        self.logger.debug(f"Search results: {results}")
        return results
    @app.callback(
        Output(self.id("dropdown"), "options"), Input(self.id("results"), "data")
    )
    def update_dropdown_options(results):
        if not results or "error" in results:
            raise PreventUpdate
        return [{"value": mpid, "label": label} for mpid, label in results.items()]
    @app.callback(
        Output(self.id("dropdown"), "value"), Input(self.id("results"), "data")
    )
    def update_dropdown_value(results):
        if not results or "error" in results:
            raise PreventUpdate
        return list(results)[0]
    @app.callback(
        Output(self.id("dropdown-container"), "style"),
        Input(self.id("results"), "data"),
    )
    def hide_show_dropdown(results):
        if not results or len(results) <= 1:
            return {"display": "none"}
        return {}
    @app.callback(
        Output(self.id("warning"), "children"), Input(self.id("results"), "data")
    )
    def show_warning(results):
        if results and "error" in results:
            return MessageContainer(MessageBody(results["error"]))
        return html.Div()
    @app.callback(
        Output(self.id("search_container"), "children"),
        Input(self.id("random"), "n_clicks"),
    )
    def update_displayed_mpid(n_clicks):
        # TODO: this is a really awkward solution to a complex callback chain, improve in future?
        return self._make_search_box(search_term=choice(self.mpid_cache))
    @app.callback(Output(self.id(), "data"), Input(self.id("dropdown"), "value"))
    def update_store_from_value(mpid):
        return mpid