def _AppendOrReturn(append, element):
 if ((append is not None) and (element is not None)):
  if (isinstance(element, list) or isinstance(element, tuple)):
   append.extend(element)
  else:
   append.append(element)
 else:
  return element

def _AppendOrReturn ( append , element ) : if ( ( append is not None ) and ( element is not None ) ) : if ( isinstance ( element , list ) or isinstance ( element , tuple ) ) : append . extend ( element ) else : append . append ( element ) else : return element
if |append| is none .