If steamID is a clan chat ID, converts to the appropriate clan ID. Otherwise, returns it untouched.
@param {SteamID} steamID
@returns SteamID
971705
function fromChatID(steamID) {
	steamID = Helpers.steamID(steamID);

	if (steamID.isGroupChat()) {
		steamID.type = SteamID.Type.CLAN;
		steamID.instance &= ~SteamID.ChatInstanceFlags.Clan;
	}

	return steamID;
}
951723
def generate_device_id(steamid):
    
    h = hexlify(sha1_hash(str(steamid).encode('ascii'))).decode('ascii')
    return "android:%s-%s-%s-%s-%s" % (h[:8], h[8:12], h[12:16], h[16:20], h[20:32])
771071
def get_chat_member(self, chat_id, user_id):
        
        result = apihelper.get_chat_member(self.token, chat_id, user_id)
        return types.ChatMember.de_json(result)
170279
public static PrimitiveId from(String id) {
    return from(Hashing.sha256().hashString(id, StandardCharsets.UTF_8).asLong());
  }
5652
private String getUserFromUniqueID(String id) {
        if (id == null) {
            return "";
        }
        id = id.trim();
        int realmDelimiterIndex = id.indexOf("/");
        if (realmDelimiterIndex < 0) {
            return "";
        } else {
            return id.substring(realmDelimiterIndex + 1);
        }
    }
169596
def get_clan_matches(session, subdomain, clan_id, from_timestamp=None, limit=None):
    """"""
    return get_recent_matches(session, 'https://{}.voobly.com/{}/{}/0'.format(
        subdomain, TEAM_MATCHES_URL, clan_id), from_timestamp, limit)
1315859
function(id) {
		for(var i = 0; i < this.config.events.length; i++) {
			if(id == this.config.events[i].unique_id) {
				return i;
			}
		}
		return -1;
	}
716668
public boolean sendLobbyChatMsg(SteamID steamIDLobby, ByteBuffer data) throws SteamException {

		if (!data.isDirect()) {
			throw new SteamException("Direct buffer required!");
		}

		return sendLobbyChatMsg(pointer, steamIDLobby.handle, data, data.position(), data.remaining());
	}
20521
function getId(id){
        if(_.isObject(id) && !_.isUndefined(id.id)){
            if (objectIdRegex.test(id.id)) {
                id = id.id;
            }
            else {
                id = null;
            }
        }
        return id;
    }
1140362
function(jid_or_user_id) {
        var jid;
        if (typeof jid_or_user_id === 'string') {
            jid = jid_or_user_id;
        } else if (typeof jid_or_user_id === 'number') {
            jid = jid_or_user_id + '-' + config.creds.appId + '@' + config.endpoints.chat;
        } else {
            throw new Error('The method "jidOrUserId" may take jid or id');
        }
        return jid;
    }
304302
public function GetTournamentPredictionsV1($event, $steamid, $steamidkey)
    {
        return $this->_call(__METHOD__, 'GET', array('event' => $event, 'steamid' => $steamid, 'steamidkey' => $steamidkey));
    }
668328
public boolean hasSpanWithId(String id) {
        TraceState ts = traceState.get();

        if (id != null && ts != null) {
            boolean spanFound = ts.getSpanForId(id) != null;
            if (log.isLoggable(Level.FINEST)) {
                log.finest("Has span with id = " + id + "? " + spanFound);
            }
            return spanFound;
        }

        return false;
    }
833738
function( userID, roomID ) {

		var userCount;

		if( roomUsers[ roomID ] === undefined ) {

			return promise.reject( 'No room with the id: ' + roomID );
		} else {

			var userIDX = roomUsers[ roomID ].indexOf( userID );

			if( userIDX != -1 ) {

				roomUsers[ roomID ].splice( userIDX, 1 );

				userCount = roomUsers[ roomID ].length;

				if( userCount == 0 ) {

					delete roomUsers[ roomID ];
				}

				return promise.resolve( userCount );
			} else {

				return promise.reject( 'User ' + userID + ' is not in the room: ' + roomID );
			}
		}
	}
209896
public Number getStreamIdForChannelId(int channelId) {
        if (channelId < 4) {
            return 0;
        }
        Number streamId = Math.floor(((channelId - 4) / 5.0d) + 1);
        if (log.isTraceEnabled()) {
            log.trace("Stream id: {} requested for channel id: {}", streamId, channelId);
        }
        return streamId;
    }
655367
function (appid) {
    return this.get('/appdetails', {
      'cc': this.options.country,
      'l': this.options.language,
      'appids': appid
    }).then(function (body) {
      var data = body[appid].data;
      if (typeof data === 'object') {
        data.steam_applink = this.getProductLink(appid);
      }
      return Promise.resolve(data);
    }.bind(this));
  }
826215
public function GetPlayerAchievementsV1($steamid, $appid, $l = null)
    {
        return $this->_call(__METHOD__, 'GET', array('steamid' => $steamid, 'appid' => $appid, 'l' => $l));
    }
21238
public function Auth()
    {
        if (!$this->OpenID->mode) {
            $this->OpenID->identity = $this->OpenIDURL;
            $this->OpenID->returnUrl = url('') . $_SERVER['REQUEST_URI'];
            $this->RedirectTo($this->OpenID->authUrl());
        } elseif ($this->OpenID->mode == 'cancel') {
            return false;
        } elseif ($this->OpenID->validate()) {
            $steamid64 = str_replace('http://steamcommunity.com/openid/id/', '', $this->OpenID->identity);

            if ($steamid64) {
                $url = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?';
                $query = http_build_query([
                        'key'      => Config::get('sgtaziz.steamauth.SteamAPIKey'),
                        'steamids' => $steamid64,
                    ]);

                $json = file_get_contents($url . $query);
                $json = json_decode($json, true);

                $user = $json['response']['players'][0];
                $user = json_decode(json_encode($user));

                return $user;
            }
        }

        return false;
    }