docs: def get_securitygroup(vm_):
      '''
      Return the security group
      '''
      sgs = list_securitygroup()
      securitygroup = config.get_cloud_config_value(
          'securitygroup', vm_, __opts__, search_global=False
      )
  
      if not securitygroup:
          raise SaltCloudNotFound('No securitygroup ID specified for this VM.')
  
      if securitygroup and six.text_type(securitygroup) in sgs:
          return sgs[securitygroup]['SecurityGroupId']
      raise SaltCloudNotFound(
          'The specified security group, \'{0}\', could not be found.'.format(
              securitygroup)
      )