def exists(self, container_name, blob_name=None, snapshot=None, timeout=None):
_validate_not_none('<STR_LIT>', container_name)<EOL>try:<EOL><INDENT>request = HTTPRequest()<EOL>request.method = '<STR_LIT:GET>' if blob_name is None else '<STR_LIT>'<EOL>request.host_locations = self._get_host_locations(secondary=True)<EOL>request.path = _get_path(container_name, blob_name)<EOL>request.query = {<EOL>'<STR_LIT>': _to_str(snapshot),<EOL>'<STR_LIT>': _int_to_str(timeout),<EOL>'<STR_LIT>': '<STR_LIT>' if blob_name is None else None,<EOL>}<EOL>expected_errors = [_CONTAINER_NOT_FOUND_ERROR_CODE] if blob_name is Noneelse [_CONTAINER_NOT_FOUND_ERROR_CODE, _BLOB_NOT_FOUND_ERROR_CODE]<EOL>self._perform_request(request, expected_errors=expected_errors)<EOL>return True<EOL><DEDENT>except AzureHttpError as ex:<EOL><INDENT>_dont_fail_not_exist(ex)<EOL>return False<EOL><DEDENT>
Returns a boolean indicating whether the container exists (if blob_name 
is None), or otherwise a boolean indicating whether the blob exists.

:param str container_name:
    Name of a container.
:param str blob_name:
    Name of a blob. If None, the container will be checked for existence.
:param str snapshot:
    The snapshot parameter is an opaque DateTime value that,
    when present, specifies the snapshot.
:param int timeout:
    The timeout parameter is expressed in seconds.
:return: A boolean indicating whether the resource exists.
:rtype: bool