def METHOD_NAME(psy):
    '''A PSyclone-script compliant transformation function. Applies
    the kernel extraction to any invoke identified in the PSy layer object.
    :param psy: The PSy layer object to apply transformations to.
    :type psy: :py:class:`psyclone.psyGen.PSy`
    '''
    extract = ExtractTrans()
    print("Invokes found:\n" +
          "\n".join([str(name) for name in psy.invokes.names]) + "\n")
    for invoke in psy.invokes.invoke_list:
        sched = invoke.schedule
        if not sched:
            print(f"Invoke {invoke.name} has no Schedule! Skipping...")
            continue
        for kern in sched.children:
            if not isinstance(kern, NemoLoop):
                continue
            try:
                # TODO #2080: once this is fixed, the option can be removed
                # The example contains array expressions, e.g.:
                # zwx(:,:,jpk) = 0.e0
                # PSyclone represents this internally using Range with LBOUND
                # and UBOUND intrinsics and currently this results in several
                # occurrences of zws on the left hand side, which will trigger
                # an exception in the dependency analysis. Therefore, disable
                # the collection of read accesses for the shape of an array.
                extract.apply(kern,
                              options={"COLLECT-ARRAY-SHAPE-READS": False})
            except TransformationError as err:
                # Typically that's caused by a kernel having a CodeBlock
                # inside.
                print("Ignoring: ", str(err.value))