def METHOD_NAME(self, fp_template, company):
    """Low level cached search for a fiscal position given its template and
    company.
    """
    xmlids = self.env["ir.model.data"].search_read(
        [
            ("model", "=", "account.fiscal.position.template"),
            ("res_id", "=", fp_template.id),
        ],
        ["name", "module"],
    )
    return (
        xmlids
        and self.env["ir.model.data"]
        .search(
            [
                ("model", "=", "account.fiscal.position"),
                ("module", "=", xmlids[0]["module"]),
                ("name", "=", "{}_{}".format(company.id, xmlids[0]["name"])),
            ]
        )
        .res_id
        or False
    )