def find_subpath(path,subpath):
    """
    Find a subpath in the band structure path

    Given the overall band structure as a list of tuples of labels and x-values
    and given a list of symmetry point labels, return the section of the path
    that matches the subpath. For example, if the band structure path is

        [("G",0.0),("H",0.18),("P",0.34),("G",0.50),("N",0.63)]

    and subpath is 

        ["H","P","G"]

    then return

        [("H",0.18),("P",0.34),("G",0.50)]

    If subpath does not correspond to a consecutive subsequence of path return
    None. For example is subpath is

        ["H","G"]
    """
    lpath = len(path)
    lsubpath = len(subpath)
    ldiff = lpath - lsubpath
    for ii in range(0,ldiff+1):
        jj = 0
        retpath = []
        match = True
        while jj < lsubpath and match:
            tuple = path[ii+jj]
            (pathlabel,pathval) = tuple
            subpathlabel = subpath[jj]
            match = match and (pathlabel == subpathlabel)
            retpath.append(tuple)
            jj = jj+1
        if match:
            return retpath
    return None