def METHOD_NAME(target, name=None):
    # if name is none, and it has the correct length for a validator pubkey, try to lookup the validator index
    if not name and isinstance(target, str) and len(target) == 98:
        with contextlib.suppress(Exception):
            if v := bacon.get_validator(target)["data"]["index"]:
                name = f"#{v}"
    if not name and isinstance(target, str):
        name = s_hex(target)
    if not name:
        name = target
    url = cfg["rocketpool.consensus_layer.explorer"]
    return f"[{name}](https://{url}/validator/{target})"