code: def _validate_locations_basics(locations: TypeMultiLine) -> None:
      """Helper function that does basic validation of line and multi-line types."""
      try:
          iter(locations)
      except TypeError:
          raise TypeError(
              "Locations should be an iterable with coordinate pairs,"
              f" but instead got {locations!r}."
          )
      try:
          next(iter(locations))
      except StopIteration:
          raise ValueError("Locations is empty.")
  
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 2 for calling a global function with example usage: _validate_locations_basics(locations) without return types