get a unique identifier for the machine running this function
172502
def sysidpath(ignore_options=False):
    
    # in the event we have to make our own
    # this should not be passed in a as a parameter
    # since we need these definitions to be more or less static
    failover = Path('/tmp/machine-id')

    if not ignore_options:
        options = (
            Path('/etc/machine-id'),
            failover,  # always read to see if we somehow managed to persist this
        )
        for option in options:
            if (option.exists() and
                os.access(option, os.R_OK) and
                option.stat().st_size > 0):
                    return option

    uuid = uuid4()
    with open(failover, 'wt') as f:
        f.write(uuid.hex)

    return failover
982900
def t_identifier(self, s):
        '
        self.rv.append(Token(type='IDENTIFIER', attr=s))
441927
private static String getIdentifier(String target) {

        // check map
        String id = LOCATION_IDENTIFIER_MAP.get(target);
        if (id == null) {
            id = LOCATION_IDENTIFIER_PREFIX + target;
            LOCATION_IDENTIFIER_MAP.put(target, id);
        }
        return id;

    }
544520
def int_id(self):
        ""
        id_or_name = self.id_or_name
        if id_or_name is not None and isinstance(id_or_name, int):
            return id_or_name
        return None
741984
function getUniqueIdentifier( root, libs, com ) {
  var id = root.attribs.id || ( com.name + ID++ );
  com.attr.id = id;
}
267945
final private function uniqueId($function)
    {
        if (is_string($function)) {
            return $function;
        }

        if (is_object($function)) {
            // Closures are currently implemented as objects
            $function = [ $function, '' ];
        } elseif (!is_array($function)) {
            $function = [ $function ];
        }

        $function = array_values($function);
        if (is_object($function[0])) {
            return \spl_object_hash($function[0]) . $function[1];
        } elseif (count($function) > 1 || is_string($function[0])) {
            // call as static
            return $function[0] . '::' . $function[1];
        }

        // unexpected result
        return null;
    }
322403
def get_id(self):
        """"""

        # This function is used by Flask-Login to store a User ID securely as a browser cookie.
        # The last part of the password is included to invalidate tokens when password change.
        # user_id and password_ends_with are encrypted, timestamped and signed.
        # This function works in tandem with UserMixin.get_user_by_token()
        user_manager = current_app.user_manager

        user_id = self.id
        password_ends_with = '' if user_manager.USER_ENABLE_AUTH0 else self.password[-8:]
        user_token = user_manager.generate_token(
            user_id,               # User ID
            password_ends_with,    # Last 8 characters of user password
        )
        # print("UserMixin.get_id: ID:", self.id, "token:", user_token)
        return user_token
940947
def get_run_as_identifiers_stack(self):
        
        session = self.get_session(False)

        try:
            return session.get_internal_attribute(self.run_as_identifiers_session_key)
        except AttributeError:
            return None
1013582
def uniqueID(size=6, chars=string.ascii_uppercase + string.digits):
    """"""
    return ''.join(random.choice(chars) for x in xrange(size))
442771
def run_id(self):
        '''
        '''
        s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', self.__class__.__name__)
        return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
94235
def address_for(machine)
      machine_id = id_for(machine)
      addr, _ = @pool.find do |(addr, id)|
        if id.is_a?(String)
          # Check for old-style UUID values. These should eventually cycle out
          # as machines are destroyed.
          id == machine.id
        else
          id == machine_id
        end
      end

      addr
    end
93582
def worker_id(self):
        """"""
        if self._worker_id is not None: return self._worker_id
        return self._get_worker_id(self._conn())
946744
def getClientUID(self):
        
        client = api.get_parent(self)
        if not client:
            return ""
        return api.get_uid(client)
390312
def identifier(self):
        

        if self.moc is None:
            self.moc = MOC()

        self.moc.id = self.params.pop()
730698
def with_id_processor(cls, *args):
        
        ip = IdentifierProcessor()
        g = cls(ip, *args)
        ip.nonstring_processor = lambda _, substitution: \
            g._process_nonstrings(substitution)
        return g
1022012
def machine(self):
        
        machine_id = self.safe_data['machine-id']
        if machine_id:
            return self.model.machines.get(machine_id, None)
        else:
            return None
1305619
def get_vm_id(kwargs=None, call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The get_vm_id function must be called with -f or --function.'
        )

    if kwargs is None:
        kwargs = {}

    name = kwargs.get('name', None)
    if name is None:
        raise SaltCloudSystemExit(
            'The get_vm_id function requires a name.'
        )

    try:
        ret = list_nodes()[name]['id']
    except KeyError:
        raise SaltCloudSystemExit(
            'The VM \'{0}\' could not be found.'.format(name)
        )

    return ret