def get_function(va): ''' return va for first instruction in function that contains given va. ''' return idaapi.get_func(va).startEA