loads data via file stream from python to triplestore

        Args:
          data: The data or filepath to load
          datatype(['ttl', 'xml', 'rdf']): the type of data to load
          namespace: the namespace to use
          graph: the graph to load the data to.
          is_file(False): If true python will read the data argument as a
              filepath, determine the datatype from the file extension,
              read the file and send it to blazegraph as a datastream

def load_data(self,
                  data,
                  datatype="ttl",
                  namespace=None,
                  graph=None,
                  is_file=False,
                  **kwargs):
        """ loads data via file stream from python to triplestore

        Args:
          data: The data or filepath to load
          datatype(['ttl', 'xml', 'rdf']): the type of data to load
          namespace: the namespace to use
          graph: the graph to load the data to.
          is_file(False): If true python will read the data argument as a
              filepath, determine the datatype from the file extension,
              read the file and send it to blazegraph as a datastream
        """
        if kwargs.get('debug'):
            log.setLevel(logging.DEBUG)
        time_start = datetime.datetime.now()
        datatype_map = {
            'ttl': 'turtle',
            'xml': 'xml',
            'rdf': 'xml',
            'nt': 'nt',
            'n3': 'n3',
            'nquads': 'nquads',
            'hturtle': 'hturtle'
        }
        if is_file:
            datatype = data.split(os.path.extsep)[-1]
            file_name = data
            log.debug('starting data load of %s', file_name)
            data = open(data, 'rb').read()
        try:
            content_type = datatype_map[datatype]
        except KeyError:
            raise NotImplementedError("'%s' is not an implemented data fromat",
                                      datatype)
        conn = self.conn
        if namespace:
            conn = self.tstore.get_namespace(namespace)
        else:
            namespace = self.namespace
        graph = pick(graph, self.graph)
        start = datetime.datetime.now()
        try:
            result = conn.parse(data=data, publicID=graph, format=content_type)
        except:
            if is_file:
                print("Datafile ", file_name)
            raise
        if is_file:
            log.info (" loaded %s into rdflib namespace '%s'",
                      file_name,
                      namespace)
        else:
            log.info(" loaded data into rdflib namespace '%s' in time: %s",
                     namespace,
                     (datetime.datetime.now() - start))
            return result