code: def _validate_path(path):
    
    if not path:
      raise ValueError('Path is empty')
    if not isinstance(path, basestring):
      raise TypeError('Path should be a string but is %s (%s).' %
                      (path.__class__, path))
docs: Basic validation of Google Storage paths.
  
    Args:
      path: a Google Storage path. It should have form '/bucket/filename'
        or '/bucket'.
  
    Raises:
      ValueError: if path is invalid.
      TypeError: if path is not of type basestring.