code: def _check_max_depth(
      self, attribute: attr.Attribute, depth: int
  ) -> None:
      """Checks if a given max depth is valid for a walking strategy.
  
      Args:
          attribute: The attribute.
          max_depth: The maximum depth of the walk to check the validity.
  
      Raises:
          ValueError: If the maximum depth is invalid.
  
      """
      if depth < 0:
          raise ValueError(f"'depth' must be >= 0 (got {depth})")
  
imports: import os
  import attr
  import requests
label_desc: Use image node_id 1 for calling a global function with example usage: _check_max_depth(attribute, depth) without return types