def fetch_datatype(self, bucket, key, r=None, pr=None,
                       basic_quorum=None, notfound_ok=None,
                       timeout=None, include_context=None):
        """
        Fetches the value of a Riak Datatype.

        .. note:: This request is automatically retried :attr:`retries`
           times if it fails due to network error.

        :param bucket: the bucket of the datatype, which must belong to a
          :class:`~riak.bucket.BucketType`
        :type bucket: :class:`~riak.bucket.RiakBucket`
        :param key: the key of the datatype
        :type key: string
        :param r: the read quorum
        :type r: integer, string, None
        :param pr: the primary read quorum
        :type pr: integer, string, None
        :param basic_quorum: whether to use the "basic quorum" policy
           for not-founds
        :type basic_quorum: bool, None
        :param notfound_ok: whether to treat not-found responses as successful
        :type notfound_ok: bool, None
        :param timeout: a timeout value in milliseconds
        :type timeout: int, None
        :param include_context: whether to return the opaque context
          as well as the value, which is useful for removal operations
          on sets and maps
        :type include_context: bool, None
        :rtype: :class:`~riak.datatypes.Datatype`
        """
        dtype, value, context = self._fetch_datatype(
            bucket, key, r=r, pr=pr, basic_quorum=basic_quorum,
            notfound_ok=notfound_ok, timeout=timeout,
            include_context=include_context)

        return TYPES[dtype](bucket=bucket, key=key, value=value,
                            context=context)
Fetches the value of a Riak Datatype.

        .. note:: This request is automatically retried :attr:`retries`
           times if it fails due to network error.

        :param bucket: the bucket of the datatype, which must belong to a
          :class:`~riak.bucket.BucketType`
        :type bucket: :class:`~riak.bucket.RiakBucket`
        :param key: the key of the datatype
        :type key: string
        :param r: the read quorum
        :type r: integer, string, None
        :param pr: the primary read quorum
        :type pr: integer, string, None
        :param basic_quorum: whether to use the "basic quorum" policy
           for not-founds
        :type basic_quorum: bool, None
        :param notfound_ok: whether to treat not-found responses as successful
        :type notfound_ok: bool, None
        :param timeout: a timeout value in milliseconds
        :type timeout: int, None
        :param include_context: whether to return the opaque context
          as well as the value, which is useful for removal operations
          on sets and maps
        :type include_context: bool, None
        :rtype: :class:`~riak.datatypes.Datatype`