import re


def get_depth_of_exec_function(backtrace):
    """
    >>> get_depth_of_exec_function(["#1  0x00007f29e6eb7df5 in standard_ExecutorRun (queryDesc=0x562aad346d38,"])
    1
    >>> get_depth_of_exec_function(["#27 0x00007f29e6eb7df5 in pgss_ExecutorRun (queryDesc=0x562aad346d38,"])
    27
    >>> get_depth_of_exec_function(["#13 0x00007f29e6eb7df5 in explain_ExecutorRun (queryDesc=0x562aad346d38,"])
    13
    >>> get_depth_of_exec_function(["#4  0x00007f29e6eb7df5 in ExecEvalNot (notclause=<optimized out>,"])
    4
    >>> get_depth_of_exec_function(["#5  0x00007f29e6eb7df5 in ExecProcNode (node=node@entry=0x562aad157358,)"])
    5
    >>> get_depth_of_exec_function(["#12 0x00007f29e6eb7df5 in ExecutePlan (dest=0x562aad15e290,"])
    12
    >>> get_depth_of_exec_function(["#21 standard_ExecutorRun (queryDesc=0x562aad0b46f8, direction=<optimized out>,"])
    21
    >>> bt = ["#0  palloc0 (size=size@entry=328)", \
              "#1  0x0000562aac6c9970 in InstrAlloc (n=n@entry=1, instrument_options=4)", \
              "#2  0x0000562aac6bdddb in ExecInitNode (node=node@entry=0x562aad49e818,"]
    >>> get_depth_of_exec_function(bt)
    2
    """
    exec_regexp = re.compile(r"#([0-9]+) .*Exec[a-zA-Z]+ \(")
    for frame in backtrace:
        m = exec_regexp.search(frame)
        if m:
            return int(m.group(1))
    return None