def get_namespaces(start=None, end=None):
q = Namespace.query()<EOL>if start is not None:<EOL><INDENT>q = q.filter(Namespace.key >= Namespace.key_for_namespace(start))<EOL><DEDENT>if end is not None:<EOL><INDENT>q = q.filter(Namespace.key < Namespace.key_for_namespace(end))<EOL><DEDENT>return [x.namespace_name for x in q]<EOL>
Return all namespaces in the specified range.

    Args:
      start: only return namespaces >= start if start is not None.
      end: only return namespaces < end if end is not None.

    Returns:
      A list of namespace names between the (optional) start and end values.