code: def is_url(string):
      """Checks if the passed string contains a valid url and nothing else. e.g. if space is included it's immediately
      invalidated the url"""
      if " " in string:
          return False
      result = urlparse(string)
      return all([result.scheme, result.netloc])
  
file_path: transformers/src/transformers/models/idefics/processing_idefics.py
imports: from typing import Callable, List, Optional, Union
  from urllib.parse import urlparse
  from ...feature_extraction_utils import BatchFeature
  from ...processing_utils import ProcessorMixin
  from ...tokenization_utils_base import BatchEncoding, PaddingStrategy, TextInput, TruncationStrategy
  from ...utils import TensorType, is_torch_available
label_desc: Use image node_id 3 for calling a global function with example usage: is_url(string) and returns: all, False