code: def _checkresponse(response):
          r
  
          results_error = 'No results were found matching your query'
          auth_error = 'The token or API key is not valid, please contact Josh Clark at joshua.m.clark@utah.edu to ' \
                       'resolve this'
          rule_error = 'This request violates a rule of the API. Please check the guidelines for formatting a data ' \
                       'request and try again'
          catch_error = 'Something went wrong. Check all your calls and try again'
  
          if response['SUMMARY']['RESPONSE_CODE'] == 1:
              return response
          elif response['SUMMARY']['RESPONSE_CODE'] == 2:
              if response['SUMMARY']['NUMBER_OF_OBJECTS'] == 0:
                  return None
              raise MesoPyError(results_error)
          elif response['SUMMARY']['RESPONSE_CODE'] == 200:
              raise MesoPyError(auth_error)
          elif response['SUMMARY']['RESPONSE_CODE'] == 400:
              raise MesoPyError(rule_error)
          elif response['SUMMARY']['RESPONSE_CODE'] == -1:
              format_error = response['SUMMARY']['RESPONSE_MESSAGE']
              raise MesoPyError(format_error)
          else:
              raise MesoPyError(catch_error)
docs: r""" Returns the data requested by the other methods assuming the response from the API is ok. If not, provides
          error handling for all possible API errors. HTTP errors are handled in the get_response() function.
  
          Arguments:
          ----------
              None.
  
          Returns:
          --------
              The response from the API as a dictionary if the API code is 2.
  
          Raises:
          -------
              MesoPyError: Gives different response messages depending on returned code from API. If the response is 2,
              resultsError is displayed. For a response of 200, an authError message is shown. A ruleError is displayed
              if the code is 400, a formatError for -1, and catchError for any other invalid response.