code: def build_geojson_upload(
      loc_mode, geojson_key=None, featureidkey=None
  ):
      curr_geojson = get_custom_geojson(geojson_key)
  
      featureidkey_options = []
      featureidkey_value = featureidkey
      featureidkey_placeholder = text("Select Uploaded Data")
      disabled = False
      if curr_geojson and not isinstance(curr_geojson, list):
          if curr_geojson.get("type") == "FeatureCollection":
              featureidkey_options = [
                  build_option(fik)
                  for fik in curr_geojson["properties"]
              ]
          else:
              featureidkey_value = None
              disabled = True
              featureidkey_placeholder = "id"
  
      return [
          html.Div(
              [
                  html.Div(
                      [
                          dcc.Upload(
                              html.Div(
                                  html.Span(
                                      html.Span(
                                          text("Upload File"),
                                          style=dict(
                                              whiteSpace="pre-line"
                                          ),
                                      ),
                                      className="input-group-addon d-block pt-1 pb-0 pointer",
                                  ),
                                  className="input-group mr-3",
                                  id="upload-geojson-btn",
                              ),
                              id="upload-geojson",
                          )
                      ],
                      className="col-auto",
                  ),
                  html.Div(
                      id="output-geojson-upload",
                      className="col mt-auto mb-auto",
                  ),
              ],
              className="row pb-5",
          ),
          html.Div(
              [
                  build_input(
                      text("geojson"),
                      dcc.Dropdown(
                          id="geojson-dropdown",
                          options=[
                              build_option(ct["key"])
                              for ct in CUSTOM_GEOJSON
                          ],
                          placeholder=text("Select Uploaded Data"),
                          style=dict(width="inherit"),
                          value=geojson_key
                          if loc_mode == "geojson-id"
                          else None,
                      ),
                      className="col-md-6",
                      id="geojson-input",
                  ),
                  build_input(
                      text("featureidkey"),
                      dcc.Dropdown(
                          id="featureidkey-dropdown",
                          options=featureidkey_options,
                          placeholder=featureidkey_placeholder,
                          style=dict(width="inherit"),
                          disabled=disabled,
                          value=featureidkey_value,
                      ),
                      className="col-md-6",
                      id="featureidkey-input",
                  ),
              ],
              className="row",
          ),
      ]
  
file_path: dtale/dtale/dash_application/custom_geojson.py
imports: import base64
  import json
  import pandas
  import dash_bootstrap_components
  from dash.dependencies import Input, Output, State
  from dtale.dash_application import dcc, html
  from dtale.dash_application.exceptions import DtalePreventUpdate
  from dtale.dash_application.layout.utils import build_input, build_option
  from dtale.translations import text
label_desc: Use image node_id 4 for calling a global function with example usage: build_geojson_upload(loc_mode, geojson_key, featureidkey) and returns: list