def do_GEOHASHTOGEOJSON(self, geoh):
geoh, with_neighbors = self._match_option('<STR_LIT>', geoh)<EOL>bbox = geohash.bbox(geoh)<EOL>try:<EOL><INDENT>with_neighbors = int(with_neighbors)<EOL><DEDENT>except TypeError:<EOL><INDENT>with_neighbors = <NUM_LIT:0><EOL><DEDENT>def expand(bbox, geoh, depth):<EOL><INDENT>neighbors = geohash.neighbors(geoh)<EOL>for neighbor in neighbors:<EOL><INDENT>other = geohash.bbox(neighbor)<EOL>if with_neighbors > depth:<EOL><INDENT>expand(bbox, neighbor, depth + <NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>if other['<STR_LIT:n>'] > bbox['<STR_LIT:n>']:<EOL><INDENT>bbox['<STR_LIT:n>'] = other['<STR_LIT:n>']<EOL><DEDENT>if other['<STR_LIT:s>'] < bbox['<STR_LIT:s>']:<EOL><INDENT>bbox['<STR_LIT:s>'] = other['<STR_LIT:s>']<EOL><DEDENT>if other['<STR_LIT:e>'] > bbox['<STR_LIT:e>']:<EOL><INDENT>bbox['<STR_LIT:e>'] = other['<STR_LIT:e>']<EOL><DEDENT>if other['<STR_LIT:w>'] < bbox['<STR_LIT:w>']:<EOL><INDENT>bbox['<STR_LIT:w>'] = other['<STR_LIT:w>']<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if with_neighbors > <NUM_LIT:0>:<EOL><INDENT>expand(bbox, geoh, <NUM_LIT:0>)<EOL><DEDENT>geojson = {<EOL>"<STR_LIT:type>": "<STR_LIT>",<EOL>"<STR_LIT>": [[<EOL>[bbox['<STR_LIT:w>'], bbox['<STR_LIT:n>']],<EOL>[bbox['<STR_LIT:e>'], bbox['<STR_LIT:n>']],<EOL>[bbox['<STR_LIT:e>'], bbox['<STR_LIT:s>']],<EOL>[bbox['<STR_LIT:w>'], bbox['<STR_LIT:s>']],<EOL>[bbox['<STR_LIT:w>'], bbox['<STR_LIT:n>']]<EOL>]]<EOL>}<EOL>print(white(json.dumps(geojson)))<EOL>
Build GeoJSON corresponding to geohash given as parameter.
        GEOHASHTOGEOJSON u09vej04 [NEIGHBORS 0|1|2]