def print_referent_lens(lens: Optional[serial_utils.Lens], origin) -> None:
    """Print a lens that may contain GetReferent steps.

    Prints part of the referent string representation.
    """

    if lens is None:
        print("no path")

    print(lens)

    obj = origin

    for step in lens.path:
        obj = step.get_sole_item(obj)

        obj_ident = (
            type(obj).__module__ + "." + python_utils.class_name(type(obj))
        )

        if isinstance(obj, Callable):
            obj_ident += (
                " = " + obj.__module__ + "." + python_utils.callable_name(obj)
            )

        if isinstance(step, GetReferent):
            print(
                "  ",
                type(step).__name__,
                repr(step),
                obj_ident,
                str(obj)[0:1024],
            )
        else:
            print("  ", type(step).__name__, repr(step), obj_ident)
Print a lens that may contain GetReferent steps.

    Prints part of the referent string representation.
    
tests/utils.py