code: def __init__(self, p: int = 1, weight: int = 1) -> None:
      if p < 1:
          raise ValueError("p must be at least 1")
      self.p = p
      self.weight = weight
  
imports: from functools import reduce
  from typing import Any
  from .base import Base, BaseSimilarity
label_desc: Use image node_id 1 to create a new Minkowski object from inherited base classes: _Base with example: obj = Minkowski(p, weight)