from typing import Callable
import hashlib


def function_to_uid(f: Callable) -> str:
    """Returns a unique identifier for the given function."""
    return hashlib.sha1(f.__name__.encode("utf-8")).hexdigest()