def _is_namespace_visible(context, namespace):
 if context.is_admin:
  return True
 if (namespace.get('visibility', '') == 'public'):
  return True
 if (namespace['owner'] is None):
  return True
 if (context.owner is not None):
  if (context.owner == namespace['owner']):
   return True
 return False

def _is_namespace_visible ( context , namespace ) : if context . is_admin : return True if ( namespace . get ( 'visibility' , '' ) == 'public' ) : return True if ( namespace [ 'owner' ] is None ) : return True if ( context . owner is not None ) : if ( context . owner == namespace [ 'owner' ] ) : return True return False
return true if namespace is visible in this context .