code: def validate_location(location: Sequence[float]) -> List[float]:
      """Validate a single lat/lon coordinate pair and convert to a list
  
      Validate that location:
      * is a sized variable
      * with size 2
      * allows indexing (i.e. has an ordering)
      * where both values are floats (or convertible to float)
      * and both values are not NaN
      """
      if isinstance(location, np.ndarray) or (
          pd is not None and isinstance(location, pd.DataFrame)
      ):
          location = np.squeeze(location).tolist()
      if not hasattr(location, "__len__"):
          raise TypeError(
              "Location should be a sized variable, "
              "for example a list or a tuple, instead got "
              f"{location!r} of type {type(location)}."
          )
      if len(location) != 2:
          raise ValueError(
              "Expected two (lat, lon) values for location, "
              f"instead got: {location!r}."
          )
      try:
          coords = (location[0], location[1])
      except (TypeError, KeyError):
          raise TypeError(
              "Location should support indexing, like a list or "
              f"a tuple does, instead got {location!r} of type {type(location)}."
          )
      for coord in coords:
          try:
              float(coord)
          except (TypeError, ValueError):
              raise ValueError(
                  "Location should consist of two numerical values, "
                  f"but {coord!r} of type {type(coord)} is not convertible to float."
              )
          if math.isnan(float(coord)):
              raise ValueError("Location values cannot contain NaNs.")
      return [float(x) for x in coords]
  
imports: import base64
  import collections
  import copy
  import json
  import math
  import os
  import re
  import tempfile
  import uuid
  from contextlib import contextmanager
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Sequence, Tuple, Type, Union
  from urllib.parse import urlparse, uses_netloc, uses_params, uses_relative
  import numpy
  from branca.element import Element, Figure
  from branca.utilities import _locations_mirror, _parse_size, none_max, none_min, write_png
label_desc: Use image node_id 1 for calling a global function with example usage: validate_location(location) and returns: unknown