code: def password_length_needed(entropybits: Union[int, float], chars: str) -> int:
      
      if not isinstance(entropybits, (int, float)):
          raise TypeError('entropybits can only be int or float')
      if entropybits < 0:
          raise ValueError('entropybits should be greater than 0')
      if not isinstance(chars, str):
          raise TypeError('chars can only be string')
      if not chars:
          raise ValueError("chars can't be null")
  
      # entropy_bits(list(characters)) = 6.554588
      entropy_c = entropy_bits(list(chars))
      return ceil(entropybits / entropy_c)
docs: Calculate the length of a password for a given entropy and chars.