def file_in_same_dir(ref_file, desired_file):
 return os.path.join(*(split_path(ref_file)[:(-1)] + [desired_file]))

def file_in_same_dir ( ref_file , desired_file ) : return os . path . join ( * ( split_path ( ref_file ) [ : ( - 1 ) ] + [ desired_file ] ) )
return the path for a file in the same dir as a given reference file .