def levelise(level):
 if (not level):
  return (False, False)
 if (level is True):
  return (True, True)
 if isinstance(level, int):
  return (True, (level - 1))
 try:
  (deep, subs) = (int(level[0]), level[1:])
  return (bool(deep), subs)
 except Exception as error:
  log.warning(error)
  raise

def levelise ( level ) : if ( not level ) : return ( False , False ) if ( level is True ) : return ( True , True ) if isinstance ( level , int ) : return ( True , ( level - 1 ) ) try : ( deep , subs ) = ( int ( level [ 0 ] ) , level [ 1 : ] ) return ( bool ( deep ) , subs ) except Exception as error : log . warning ( error ) raise
describe which levels are allowed to do deep merging .