def _should_skip_elem(elem, type=None, dest=None):
 if (('draft' in elem.attrib) or ('alt' in elem.attrib)):
  if ((dest is None) or (type in dest)):
   return True

def _should_skip_elem ( elem , type = None , dest = None ) : if ( ( 'draft' in elem . attrib ) or ( 'alt' in elem . attrib ) ) : if ( ( dest is None ) or ( type in dest ) ) : return True
check whether the given element should be skipped .