'Create the library described in the fixture.
Will fail if the library already exists.'

def _create_library(self):

    response = self.session.post((STUDIO_BASE_URL + '/library/'), data=self._encode_post_dict(self.library_info), headers=self.headers)
    if response.ok:
        self._library_key = response.json()['library_key']
    else:
        try:
            err_msg = response.json().get('ErrMsg')
        except ValueError:
            err_msg = 'Unknown    Error'
        raise FixtureError('Could    not    create    library    {}.    Status    was    {},    error    was:    {}'.format(self.library_info, response.status_code, err_msg))
