def valid_id(opts, id_):
 try:
  return bool(clean_path(opts['pki_dir'], id_))
 except (AttributeError, KeyError) as e:
  return False

def valid_id ( opts , id_ ) : try : return bool ( clean_path ( opts [ 'pki_dir' ] , id_ ) ) except ( AttributeError , KeyError ) as e : return False
returns if the passed id is valid .