def METHOD_NAME(self, connection, ansible_facts, data=None):
    """ Populate the facts for interfaces
    :param connection: the device connection
    :param ansible_facts: Facts dictionary
    :param data: previously collected conf
    :rtype: dictionary
    :returns: facts
    """
    if not data:
        data = connection.get_config(flags=["| grep interfaces"])
    objs = []
    interface_names = findall(
        r"^set interfaces (?:ethernet|bonding|vti|loopback|vxlan) (?:\'*)(\S+)(?:\'*)",
        data,
        M,
    )
    if interface_names:
        for interface in set(interface_names):
            intf_regex = r" %s .+$" % interface.strip("'")
            cfg = findall(intf_regex, data, M)
            obj = self.render_config(cfg)
            obj["name"] = interface.strip("'")
            if obj:
                objs.append(obj)
    facts = {}
    if objs:
        facts["interfaces"] = []
        params = utils.validate_config(
            self.argument_spec, {"config": objs}
        )
        for cfg in params["config"]:
            facts["interfaces"].append(utils.remove_empties(cfg))
    ansible_facts["ansible_network_resources"].update(facts)
    return ansible_facts