code: def get_organization_id(server_config, label):
      
      response = requests.get(
          server_config['url'] + '/katello/api/v2/organizations',
          data=json.dumps({'search': 'label={}'.format(label)}),
          auth=server_config['auth'],
          headers={'content-type': 'application/json'},
          verify=server_config['verify'],
      )
      response.raise_for_status()
      decoded = response.json()
      if decoded['subtotal'] != 1:
          print(
              'Expected to find one organization, but instead found {0}. Search '
              'results: {1}'.format(decoded['subtotal'], decoded['results'])
          )
          exit(1)
      return decoded['results'][0]['id']
docs: Return the ID of the organization with label ``label``.
  
      :param server_config: A dict of information about the server being talked
          to. The dict should include the keys "url", "auth" and "verify".
      :param label: A string label that will be used when searching. Every
          organization should have a unique label.
      :returns: An organization ID. (Typically an integer.)