project_name
string
class_name
string
class_modifiers
string
class_implements
int64
class_extends
int64
function_name
string
function_body
string
cyclomatic_complexity
int64
NLOC
int64
num_parameter
int64
num_token
int64
num_variable
int64
start_line
int64
end_line
int64
function_index
int64
function_params
string
function_variable
string
function_return_type
string
function_body_line_type
string
function_num_functions
int64
function_num_lines
int64
outgoing_function_count
int64
outgoing_function_names
string
incoming_function_count
int64
incoming_function_names
string
lexical_representation
string
unifyai_unify
_UniClient
protected
1
1
_append_to_history
def _append_to_history(self, assistant_msg: dict) -> None:"""Append a single assistant message to the internal history."""if self._messages is None:self._messages = []self._messages.append(assistant_msg)
2
4
2
33
0
479
483
479
self,assistant_msg
[]
None
{"Assign": 1, "Expr": 2, "If": 1}
1
5
1
["self._messages.append"]
0
[]
The function (_append_to_history) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 479 and ends at 483. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [479.0] and does not return any value. It declare 1.0 function, and It has 1.0 function called inside which is ["self._messages.append"].
unifyai_unify
public
public
0
0
_wrap_sync_stream._take
def _take(item: Any) -> str:if return_full_completion:# ChatCompletionChunk β†’ extract incremental deltatry:delta = item.choices[0].delta.contentreturn delta or ""# may be Noneexcept Exception:# noqa: BLE001return ""return str(item)
4
8
1
40
0
503
511
503
null
[]
None
null
0
0
0
null
0
null
The function (_wrap_sync_stream._take) defined within the public class called public.The function start at line 503 and ends at 511. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
unifyai_unify
_UniClient
protected
1
1
_wrap_sync_stream
def _wrap_sync_stream(self,stream: Generator[Any, None, None],*,stateful: bool,return_full_completion: bool,) -> Generator[Any, None, None]:"""Proxy a *synchronous* stream, collecting the emitted content so we canupdate or clear the history once (and only once) when the streamfinishes."""collected: list[str] = []def _take(item: Any) -> str:if return_full_completion:# ChatCompletionChunk β†’ extract incremental deltatry:delta = item.choices[0].delta.contentreturn delta or ""# may be Noneexcept Exception:# noqa: BLE001return ""return str(item)try:for chunk in stream:if stateful:piece = _take(chunk)if piece:collected.append(piece)yield chunkfinally:# executes on normal end *and* on .close()if stateful:if collected:self._append_to_history({"role": "assistant", "content": "".join(collected).strip()},)elif self._messages:self._messages.clear()
8
24
4
119
0
489
527
489
self,stream,stateful,return_full_completion
[]
Generator[Any, None, None]
{"AnnAssign": 1, "Assign": 2, "Expr": 5, "For": 1, "If": 6, "Return": 3, "Try": 2}
7
39
7
["str", "_take", "collected.append", "self._append_to_history", "strip", "join", "self._messages.clear"]
0
[]
The function (_wrap_sync_stream) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 489 and ends at 527. It contains 24 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [489.0] and does not return any value. It declares 7.0 functions, and It has 7.0 functions called inside which are ["str", "_take", "collected.append", "self._append_to_history", "strip", "join", "self._messages.clear"].
unifyai_unify
public
public
0
0
_wrap_async_stream._internal
async def _internal():async for chunk in stream:if stateful:if return_full_completion:try:delta = chunk.choices[0].delta.contentif delta:collected.append(delta)except Exception:# noqa: BLE001passelse:collected.append(str(chunk))yield chunk# async-generator exhaustedif stateful:if collected:self._append_to_history({"role": "assistant", "content": "".join(collected).strip()},)elif self._messages:self._messages.clear()
9
20
0
98
0
541
562
541
null
[]
None
null
0
0
0
null
0
null
The function (_wrap_async_stream._internal) defined within the public class called public.The function start at line 541 and ends at 562. It contains 20 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
unifyai_unify
_UniClient
protected
1
1
_wrap_async_stream
def _wrap_async_stream(# noqa: WPS231self,stream: AsyncGenerator[Any, None],*,stateful: bool,return_full_completion: bool,) -> AsyncGenerator[Any, None]:"""Same as `_wrap_sync_stream` but for *async* generators."""collected: list[str] = []async def _internal():async for chunk in stream:if stateful:if return_full_completion:try:delta = chunk.choices[0].delta.contentif delta:collected.append(delta)except Exception:# noqa: BLE001passelse:collected.append(str(chunk))yield chunk# async-generator exhaustedif stateful:if collected:self._append_to_history({"role": "assistant", "content": "".join(collected).strip()},)elif self._messages:self._messages.clear()return _internal()
1
10
4
49
0
529
564
529
self,stream,stateful,return_full_completion
[]
AsyncGenerator[Any, None]
{"AnnAssign": 1, "Assign": 1, "Expr": 6, "If": 6, "Return": 1, "Try": 1}
8
36
8
["collected.append", "collected.append", "str", "self._append_to_history", "strip", "join", "self._messages.clear", "_internal"]
0
[]
The function (_wrap_async_stream) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 529 and ends at 564. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [529.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["collected.append", "collected.append", "str", "self._append_to_history", "strip", "join", "self._messages.clear", "_internal"].
unifyai_unify
public
public
0
0
_apply_stateful_logic._await_then_wrap
async def _await_then_wrap(coro):inner = await coro# real result from _generate# inner is expected to be async-gen, but handle sync-gen tooif inspect.isasyncgen(inner):return self._wrap_async_stream(inner,stateful=stateful,return_full_completion=return_full_completion,)if isinstance(inner, (list, tuple)) or inspect.isgenerator(inner):# rare case: provider gave back sync generatorreturn self._wrap_sync_stream(inner,stateful=stateful,return_full_completion=return_full_completion,)# not a generator at all – treat like non-stream single resultreturn self._apply_stateful_logic(response=inner,stateful=stateful,was_stream=False,return_full_completion=return_full_completion,)
4
20
1
90
0
587
610
587
null
[]
None
null
0
0
0
null
0
null
The function (_apply_stateful_logic._await_then_wrap) defined within the public class called public.The function start at line 587 and ends at 610. It contains 20 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
_apply_stateful_logic._await_and_process
async def _await_and_process(coro: Coroutine[Any, Any, Any]):try:res = await coroexcept Exception:# nothing was inserted yet, just re-raiseraiseif stateful and placeholder_idx is not None:if return_full_completion:self._messages.insert(placeholder_idx,res.choices[0].message.model_dump(),)else:self._messages.insert(placeholder_idx,{"role": "assistant", "content": str(res)},)elif self._messages:self._messages.clear()return res
6
19
1
95
0
637
657
637
null
[]
None
null
0
0
0
null
0
null
The function (_apply_stateful_logic._await_and_process) defined within the public class called public.The function start at line 637 and ends at 657. It contains 19 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value..
unifyai_unify
_UniClient
protected
1
1
_apply_stateful_logic
def _apply_stateful_logic(# noqa: WPS231,WPS211self,*,response: Any,stateful: bool,was_stream: bool,return_full_completion: bool,) -> Any:"""Ensures the conversation history is updated (or cleared) **once** percall, for all four modalities."""if was_stream:if inspect.iscoroutine(response):async def _await_then_wrap(coro):inner = await coro# real result from _generate# inner is expected to be async-gen, but handle sync-gen tooif inspect.isasyncgen(inner):return self._wrap_async_stream(inner,stateful=stateful,return_full_completion=return_full_completion,)if isinstance(inner, (list, tuple)) or inspect.isgenerator(inner):# rare case: provider gave back sync generatorreturn self._wrap_sync_stream(inner,stateful=stateful,return_full_completion=return_full_completion,)# not a generator at all – treat like non-stream single resultreturn self._apply_stateful_logic(response=inner,stateful=stateful,was_stream=False,return_full_completion=return_full_completion,)# Return *the coroutine itself* so the caller still needs to `await`return _await_then_wrap(response)# choose correct wrapper (sync vs async)if inspect.isasyncgen(response):return self._wrap_async_stream(response,stateful=stateful,return_full_completion=return_full_completion,)return self._wrap_sync_stream(response,stateful=stateful,return_full_completion=return_full_completion,)# ───── coroutine (async-non-stream) path ──────────────────────────if inspect.iscoroutine(response):# 1. Capture the index where the assistant reply will go, but#**do not** insert the placeholder yet.This avoids sending an#empty assistant message to the LLM while still fixing order.placeholder_idx: int | None = len(self._messages) if stateful else None# 2. Await the real coroutine and overwrite the placeholder in-placeasync def _await_and_process(coro: Coroutine[Any, Any, Any]):try:res = await coroexcept Exception:# nothing was inserted yet, just re-raiseraiseif stateful and placeholder_idx is not None:if return_full_completion:self._messages.insert(placeholder_idx,res.choices[0].message.model_dump(),)else:self._messages.insert(placeholder_idx,{"role": "assistant", "content": str(res)},)elif self._messages:self._messages.clear()return resreturn _await_and_process(response)# ---------- non-streaming path ----------if stateful:if return_full_completion:assistant_dict = response.choices[0].message.model_dump()else:assistant_dict = {"role": "assistant", "content": str(response)}self._append_to_history(assistant_dict)elif self._messages:self._messages.clear()return response
9
36
5
174
0
570
671
570
self,response,stateful,was_stream,return_full_completion
[]
Any
{"AnnAssign": 1, "Assign": 4, "Expr": 6, "If": 12, "Return": 9, "Try": 1}
23
102
23
["inspect.iscoroutine", "inspect.isasyncgen", "self._wrap_async_stream", "isinstance", "inspect.isgenerator", "self._wrap_sync_stream", "self._apply_stateful_logic", "_await_then_wrap", "inspect.isasyncgen", "self._wrap_async_stream", "self._wrap_sync_stream", "inspect.iscoroutine", "len", "self._messages.insert", "message.model_dump", "self._messages.insert", "str", "self._messages.clear", "_await_and_process", "message.model_dump", "str", "self._append_to_history", "self._messages.clear"]
0
[]
The function (_apply_stateful_logic) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 570 and ends at 671. It contains 36 lines of code and it has a cyclomatic complexity of 9. It takes 5 parameters, represented as [570.0] and does not return any value. It declares 23.0 functions, and It has 23.0 functions called inside which are ["inspect.iscoroutine", "inspect.isasyncgen", "self._wrap_async_stream", "isinstance", "inspect.isgenerator", "self._wrap_sync_stream", "self._apply_stateful_logic", "_await_then_wrap", "inspect.isasyncgen", "self._wrap_async_stream", "self._wrap_sync_stream", "inspect.iscoroutine", "len", "self._messages.insert", "message.model_dump", "self._messages.insert", "str", "self._messages.clear", "_await_and_process", "message.model_dump", "str", "self._append_to_history", "self._messages.clear"].
unifyai_unify
_UniClient
protected
1
1
_get_client
def _get_client(self):raise NotImplementedError
1
2
1
7
0
677
678
677
self
[]
None
{}
0
2
0
[]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.init_avp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.update_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py._get_client_uuid", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_all_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_permissions_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_resources_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_scopes_command"]
The function (_get_client) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 677 and ends at 678. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 8.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.init_avp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.update_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py._get_client_uuid", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_all_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_permissions_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_resources_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_scopes_command"].
unifyai_unify
_UniClient
protected
1
1
generate
def generate(self,user_message: Optional[str] = None,system_message: Optional[str] = None,messages: Optional[Union[List[ChatCompletionMessageParam],Dict[str, List[ChatCompletionMessageParam]],]] = None,*,frequency_penalty: Optional[float] = None,logit_bias: Optional[Dict[str, int]] = None,logprobs: Optional[bool] = None,top_logprobs: Optional[int] = None,max_completion_tokens: Optional[int] = None,n: Optional[int] = None,presence_penalty: Optional[float] = None,response_format: Optional[Union[Type[BaseModel], Dict[str, str]]] = None,seed: Optional[int] = None,stop: Union[Optional[str], List[str]] = None,stream: Optional[bool] = None,stream_options: Optional[ChatCompletionStreamOptionsParam] = None,temperature: Optional[float] = None,top_p: Optional[float] = None,tools: Optional[Iterable[ChatCompletionToolParam]] = None,tool_choice: Optional[ChatCompletionToolChoiceOptionParam] = None,parallel_tool_calls: Optional[bool] = None,reasoning_effort: Optional[str] = None,# platform argumentsuse_custom_keys: Optional[bool] = None,tags: Optional[List[str]] = None,drop_params: Optional[bool] = None,region: Optional[str] = None,log_query_body: Optional[bool] = None,log_response_body: Optional[bool] = None,# python client argumentsstateful: Optional[bool] = None,return_full_completion: Optional[bool] = None,cache: Optional[Union[bool, str]] = None,cache_backend: Optional[str] = None,# passthrough argumentsextra_headers: Optional[Headers] = None,extra_query: Optional[Query] = None,service_tier: Optional[str] = None,**kwargs,):"""Generate a ChatCompletion response for the specified endpoint,from the provided query parameters.Args:user_message: A string containing the user message.If provided, messages must be None.system_message: An optional string containing the system message. Thisalways appears at the beginning of the list of messages.messages: A list of messages comprising the conversation so far, oroptionally a dictionary of such messages, with clients as the keys in thecase of multi-llm clients. This will be appended to the system_message if itis not None, and any user_message will be appended if it is not None.frequency_penalty: Number between -2.0 and 2.0. Positive values penalize newtokens based on their existing frequency in the text so far, decreasing themodel's likelihood to repeat the same line verbatim.logit_bias: Modify the likelihood of specified tokens appearing in thecompletion. Accepts a JSON object that maps tokens (specified by their tokenID in the tokenizer) to an associated bias value from -100 to 100.Mathematically, the bias is added to the logits generated by the model priorto sampling. The exact effect will vary per model, but values between -1 and1 should decrease or increase likelihood of selection; values like -100 or100 should result in a ban or exclusive selection of the relevant token.logprobs: Whether to return log probabilities of the output tokens or not.If true, returns the log probabilities of each output token returned in thecontent of message.top_logprobs: An integer between 0 and 20 specifying the number of mostlikely tokens to return at each token position, each with an associated logprobability. logprobs must be set to true if this parameter is used.max_completion_tokens: The maximum number of tokens that can be generated inthe chat completion. The total length of input tokens and generated tokensis limited by the model's context length. Defaults value is None. Uses theprovider's default max_completion_tokens when None is explicitly passed.n: How many chat completion choices to generate for each input message. Notethat you will be charged based on the number of generated tokens across allof the choices. Keep n as 1 to minimize costs.presence_penalty: Number between -2.0 and 2.0. Positive values penalize newtokens based on whether they appear in the text so far, increasing themodel's likelihood to talk about new topics.response_format: An object specifying the format that the model must output.Setting to `{ "type": "json_schema", "json_schema": {...} }` enablesStructured Outputs which ensures the model will match your supplied JSONschema. Learn more in the Structured Outputs guide. Setting to`{ "type": "json_object" }` enables JSON mode, which ensures the message themodel generates is valid JSON.seed: If specified, a best effort attempt is made to sampledeterministically, such that repeated requests with the same seed andparameters should return the same result. Determinism is not guaranteed, andyou should refer to the system_fingerprint response parameter to monitorchanges in the backend.stop: Up to 4 sequences where the API will stop generating further tokens.stream: If True, generates content as a stream. If False, generates contentas a single response. Defaults to False.stream_options: Options for streaming response. Only set this when you setstream: true.temperature:What sampling temperature to use, between 0 and 2.Higher values like 0.8 will make the output more random,while lower values like 0.2 will make it more focused and deterministic.It is generally recommended to alter this or top_p, but not both.Default value is 1.0. Defaults to the provider's default temperature whenNone is explicitly passed.top_p: An alternative to sampling with temperature, called nucleus sampling,where the model considers the results of the tokens with top_p probabilitymass. So 0.1 means only the tokens comprising the top 10% probability massare considered. Generally recommended to alter this or temperature, but notboth.tools: A list of tools the model may call. Currently, only functions aresupported as a tool. Use this to provide a list of functions the model maygenerate JSON inputs for. A max of 128 functions are supported.tool_choice: Controls which (if any) tool is called by themodel. none means the model will not call any tool and instead generates amessage. auto means the model can pick between generating a message orcalling one or more tools. required means the model must call one or moretools. Specifying a particular tool via`{ "type": "function", "function": {"name": "my_function"} }`forces the model to call that tool.none is the default when no tools are present. auto is the default if toolsare present.parallel_tool_calls: Whether to enable parallel function calling during tooluse.use_custom_keys:Whether to use custom API keys or our unified API keyswith the backend provider. Defaults to False.tags: Arbitrary number of tags to classify this API query as needed. Helpfulfor generally grouping queries across tasks and users, for logging purposes.drop_params: Whether or not to drop unsupported OpenAI params by theprovider you’re using.region: A string used to represent the region where the endpoint isaccessed. Only relevant for on-prem deployments with certain providers like`vertex-ai`, `aws-bedrock` and `azure-ml`, where the endpoint is beingaccessed through a specified region.log_query_body: Whether to log the contents of the query json body.log_response_body: Whether to log the contents of the response json body.stateful:Whether the conversation history is preserved within the messagesof this client. If True, then history is preserved. If False, then this actsas a stateless client, and message histories must be managed by the user.return_full_completion: If False, only return the message contentchat_completion.choices[0].message.content.strip(" ") from the OpenAIreturn. Otherwise, the full response chat_completion is returned.Defaults to False.cache: If True, then the arguments will be stored in a local cache file, andany future calls with identical arguments will read from the cache insteadof running the LLM query. If "write" then the cache will only be writtento, if "read" then the cache will be read from if a cache is available butwill not write, and if "read-only" then the argument must be present in thecache, else an exception will be raised. Finally, an appending "-closest"will read the closest match from the cache, and overwrite it if cache writingis enabled. This argument only has any effect when stream=False.extra_headers: Additional "passthrough" headers for the request which areprovider-specific, and are not part of the OpenAI standard. They are handledby the provider-specific API.extra_query: Additional "passthrough" query parameters for the request whichare provider-specific, and are not part of the OpenAI standard. They arehandled by the provider-specific API.kwargs: Additional "passthrough" JSON properties for the body of therequest, which are provider-specific, and are not part of the OpenAIstandard. They will be handled by the provider-specific API.Returns:If stream is True, returns a generator yielding chunks of content.If stream is False, returns a single string response.Raises:UnifyError: If an error occurs during content generation."""system_message = _default(system_message, self._system_message)messages = _default(messages, self._messages)stateful = _default(stateful, self._stateful)if messages:sys_msg_inside = any(msg["role"] == "system" for msg in messages)if not sys_msg_inside and system_message is not None:messages = [{"role": "system", "content": system_message},] + messagesif user_message is not None:messages += [{"role": "user", "content": user_message}]else:messages = list()if system_message is not None:messages += [{"role": "system", "content": system_message}]if user_message is not None:messages += [{"role": "user", "content": user_message}]self._messages = messagesreturn_full_completion = (Trueif _default(tools, self._tools)else _default(return_full_completion, self._return_full_completion))cache = _default(cache, self._cache)_cache_modes = ["read", "read-only", "write", "both"]assert cache in _cache_modes + [m + "-closest" for m in _cache_modes] + [True,False,None,]ret = self._generate(messages=messages,frequency_penalty=_default(frequency_penalty, self._frequency_penalty),logit_bias=_default(logit_bias, self._logit_bias),logprobs=_default(logprobs, self._logprobs),top_logprobs=_default(top_logprobs, self._top_logprobs),max_completion_tokens=_default(max_completion_tokens,self._max_completion_tokens,),n=_default(n, self._n),presence_penalty=_default(presence_penalty, self._presence_penalty),response_format=_default(response_format, self._response_format),seed=_default(_default(seed, self._seed), unify.get_seed()),stop=_default(stop, self._stop),stream=_default(stream, self._stream),stream_options=_default(stream_options, self._stream_options),temperature=_default(temperature, self._temperature),top_p=_default(top_p, self._top_p),service_tier=_default(service_tier, self._service_tier),tools=_default(tools, self._tools),tool_choice=_default(tool_choice, self._tool_choice),parallel_tool_calls=_default(parallel_tool_calls,self._parallel_tool_calls,),reasoning_effort=_default(reasoning_effort, self._reasoning_effort),# platform argumentsuse_custom_keys=_default(use_custom_keys, self._use_custom_keys),tags=_default(tags, self._tags),drop_params=_default(drop_params, self._drop_params),region=_default(region, self._region),log_query_body=_default(log_query_body, self._log_query_body),log_response_body=_default(log_response_body, self._log_response_body),# python client argumentsreturn_full_completion=return_full_completion,cache=_default(cache, is_caching_enabled()),cache_backend=_default(cache_backend, self._cache_backend),# passthrough argumentsextra_headers=_default(extra_headers, self._extra_headers),extra_query=_default(extra_query, self._extra_query),**{**self._extra_body, **kwargs},)ret = self._apply_stateful_logic(response=ret,stateful=stateful,was_stream=_default(stream, self._stream),return_full_completion=return_full_completion,)return ret
10
121
39
969
0
683
963
683
self,user_message,system_message,messages,frequency_penalty,logit_bias,logprobs,top_logprobs,max_completion_tokens,n,presence_penalty,response_format,seed,stop,stream,stream_options,temperature,top_p,tools,tool_choice,parallel_tool_calls,reasoning_effort,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,stateful,return_full_completion,cache,cache_backend,extra_headers,extra_query,service_tier,**kwargs
[]
Returns
{"Assign": 12, "AugAssign": 3, "Expr": 1, "If": 5, "Return": 1}
43
281
43
["_default", "_default", "_default", "any", "list", "_default", "_default", "_default", "self._generate", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "unify.get_seed", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "is_caching_enabled", "_default", "_default", "_default", "self._apply_stateful_logic", "_default"]
45
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.autodoc_py.RPCMethodDocumenter.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3685324_prologin_stechec2.tools.gendiff_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701004_elfi_dev_elfi.elfi.methods.inference.samplers_py.Rejection._update_distances", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.examples.bench.bigtable_py.test_builder", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.examples.bench.bigtable_py.test_genshi_builder", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_html_py.HTMLFormFillerTestCase.test_fill_option_segmented_text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_html_py.HTMLFormFillerTestCase.test_fill_option_segmented_text_no_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.tests.test_directives_py.ContentDirectiveTestCase.test_as_element", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.tests.test_directives_py.ForDirectiveTestCase.test_for_with_empty_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.tests.test_directives_py.ReplaceDirectiveTestCase.test_replace_with_empty_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.tests.test_markup_py.MarkupTemplateTestCase.test_directive_value_syntax_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.tests.test_builder_py.ElementFactoryTestCase.test_stream_as_child", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_cache_arg", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi_asdict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi_asdict_keys_missing", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi_asdict_keys_missing_existing_cache_fn", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi_namespace", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966919_archivy_archivy.archivy.click_web.resources.cmd_exec_py._create_cmd_header", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981965_allegroai_clearml_server.apiserver.services.events_py.download_task_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981965_allegroai_clearml_server.apiserver.services.organization_py.download_for_get_all", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69677202_py2many_py2many.py2many.macosx_llm_py.Model.prompt", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.dataset.artificial._base_py.RecipeDataset.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.nursery.tsbench.src.tsbench.config.dataset.sources_py.M3DatasetConfig.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.test.dataset.artificial.test_recipe_py.test_generate"]
The function (generate) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 683 and ends at 963. It contains 121 lines of code and it has a cyclomatic complexity of 10. It takes 39 parameters, represented as [683.0], and this function return a value. It declares 43.0 functions, It has 43.0 functions called inside which are ["_default", "_default", "_default", "any", "list", "_default", "_default", "_default", "self._generate", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "unify.get_seed", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "is_caching_enabled", "_default", "_default", "_default", "self._apply_stateful_logic", "_default"], It has 45.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.autodoc_py.RPCMethodDocumenter.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3685324_prologin_stechec2.tools.gendiff_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701004_elfi_dev_elfi.elfi.methods.inference.samplers_py.Rejection._update_distances", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.examples.bench.bigtable_py.test_builder", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.examples.bench.bigtable_py.test_genshi_builder", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_html_py.HTMLFormFillerTestCase.test_fill_option_segmented_text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_html_py.HTMLFormFillerTestCase.test_fill_option_segmented_text_no_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.tests.test_directives_py.ContentDirectiveTestCase.test_as_element", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.tests.test_directives_py.ForDirectiveTestCase.test_for_with_empty_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.tests.test_directives_py.ReplaceDirectiveTestCase.test_replace_with_empty_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.tests.test_markup_py.MarkupTemplateTestCase.test_directive_value_syntax_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.tests.test_builder_py.ElementFactoryTestCase.test_stream_as_child", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_cache_arg", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi_asdict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi_asdict_keys_missing", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi_asdict_keys_missing_existing_cache_fn", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.tests.cache.test_decorator_py.CacheDecoratorTest.test_multi_namespace", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966919_archivy_archivy.archivy.click_web.resources.cmd_exec_py._create_cmd_header", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981965_allegroai_clearml_server.apiserver.services.events_py.download_task_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981965_allegroai_clearml_server.apiserver.services.organization_py.download_for_get_all", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69677202_py2many_py2many.py2many.macosx_llm_py.Model.prompt", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.dataset.artificial._base_py.RecipeDataset.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.nursery.tsbench.src.tsbench.config.dataset.sources_py.M3DatasetConfig.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.test.dataset.artificial.test_recipe_py.test_generate"].
unifyai_unify
_UniClient
protected
1
1
_get_client
def _get_client(self):try:if self._should_use_direct_mode:return openai.OpenAI(api_key=self._openai_api_key,timeout=3600.0,# one hour)http_client = make_httpx_client_for_unify_logging(BASE_URL)return openai.OpenAI(base_url=f"{BASE_URL}",api_key=self._api_key,timeout=3600.0,# one hourhttp_client=http_client,)except openai.OpenAIError as e:raise Exception(f"Failed to initialize Unify client: {str(e)}")
3
16
1
76
0
970
985
970
self
[]
None
{}
0
2
0
[]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.init_avp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.update_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py._get_client_uuid", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_all_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_permissions_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_resources_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_scopes_command"]
The function (_get_client) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 970 and ends at 985. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It has 8.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.init_avp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.update_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py._get_client_uuid", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_all_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_permissions_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_resources_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_scopes_command"].
unifyai_unify
Unify
public
0
1
_generate_stream
def _generate_stream(self,endpoint: str,prompt: Prompt,# streamstream_options: Optional[ChatCompletionStreamOptionsParam],# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client argumentsreturn_full_completion: bool,) -> Generator[str, None, None]:kw = self._handle_kw(prompt=prompt,endpoint=endpoint,stream=True,stream_options=stream_options,use_custom_keys=use_custom_keys,tags=tags,drop_params=drop_params,region=region,log_query_body=log_query_body,log_response_body=log_response_body,)if self._should_use_direct_mode:kw.pop("extra_body")try:if endpoint in LOCAL_MODELS:kw.pop("extra_body")kw.pop("model")kw.pop("max_completion_tokens")chat_completion = LOCAL_MODELS[endpoint](**kw)else:if unify.CLIENT_LOGGING:print(f"calling {kw['model']}... (thread {threading.get_ident()})")if self.traced:chat_completion = unify.traced(self._client.chat.completions.create,span_type="llm-stream",name=(endpointif tags is Noneelse endpoint + "[" + ",".join([str(t) for t in tags]) + "]"),)(**kw)else:chat_completion = self._client.chat.completions.create(**kw)if unify.CLIENT_LOGGING:print(f"done (thread {threading.get_ident()})")for chunk in chat_completion:if return_full_completion:content = chunkelse:content = chunk.choices[0].delta.content# type: ignore[union-attr]# noqa: E501if content is not None:yield contentexcept openai.APIStatusError as e:raise Exception(e.message)
12
59
11
317
0
987
1,048
987
self,endpoint,prompt,stream_options,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion
[]
Generator[str, None, None]
{"Assign": 6, "Expr": 7, "For": 1, "If": 7, "Try": 1}
14
62
14
["self._handle_kw", "kw.pop", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "self._client.chat.completions.create", "print", "threading.get_ident", "Exception"]
0
[]
The function (_generate_stream) defined within the public class called Unify, that inherit another class.The function start at line 987 and ends at 1048. It contains 59 lines of code and it has a cyclomatic complexity of 12. It takes 11 parameters, represented as [987.0] and does not return any value. It declares 14.0 functions, and It has 14.0 functions called inside which are ["self._handle_kw", "kw.pop", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "self._client.chat.completions.create", "print", "threading.get_ident", "Exception"].
unifyai_unify
public
public
0
0
_generate_non_stream._get_cache_traced
def _get_cache_traced(**kw):return _get_cache(fn_name="chat.completions.create",kw=kw,raise_on_empty=cache == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=cache_backend,)
1
9
1
36
0
1,097
1,105
1,097
null
[]
None
null
0
0
0
null
0
null
The function (_generate_non_stream._get_cache_traced) defined within the public class called public.The function start at line 1097 and ends at 1105. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
Unify
public
0
1
_generate_non_stream
def _generate_non_stream(self,endpoint: str,prompt: Prompt,# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client argumentsreturn_full_completion: bool,cache: Union[bool, str],cache_backend: str,) -> Union[str, ChatCompletion]:kw = self._handle_kw(prompt=prompt,endpoint=endpoint,stream=False,stream_options=None,use_custom_keys=use_custom_keys,tags=tags,drop_params=drop_params,region=region,log_query_body=log_query_body,log_response_body=log_response_body,)if self._should_use_direct_mode:kw.pop("extra_body")if isinstance(cache, str) and cache.endswith("-closest"):cache = cache.removesuffix("-closest")read_closest = Trueelse:read_closest = Falseif "response_format" in kw:chat_method = self._client.beta.chat.completions.parsedel kw["stream"]elif endpoint == "user-input":chat_method = lambda *a, **kw: input("write your agent response:\n")else:chat_method = self._client.chat.completions.createchat_completion = Nonein_cache = Falseif cache in [True, "both", "read", "read-only"]:if self._traced:def _get_cache_traced(**kw):return _get_cache(fn_name="chat.completions.create",kw=kw,raise_on_empty=cache == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=cache_backend,)chat_completion = unify.traced(_get_cache_traced,span_type="llm-cached",name=(endpointif tags is Noneelse endpoint + "[" + ",".join([str(t) for t in tags]) + "]"),)(**kw)else:chat_completion = _get_cache(fn_name="chat.completions.create",kw=kw,raise_on_empty=cache == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=cache_backend,)in_cache = True if chat_completion is not None else Falseif chat_completion is None:try:if endpoint in LOCAL_MODELS:kw.pop("extra_body")kw.pop("model")kw.pop("max_completion_tokens")chat_completion = LOCAL_MODELS[endpoint](**kw)else:if unify.CLIENT_LOGGING:print(f"calling {kw['model']}... (thread {threading.get_ident()})",)if self._traced:chat_completion = unify.traced(chat_method,span_type="llm",name=(endpointif tags is Noneelse endpoint+ "["+ ",".join([str(t) for t in tags])+ "]"),)(**kw)else:chat_completion = chat_method(**kw)if unify.CLIENT_LOGGING:print(f"done (thread {threading.get_ident()})")except openai.APIStatusError as e:raise Exception(e.message)if (chat_completion is not None or read_closest) and cache in [True,"both","write",]:if not in_cache or cache == "write":_write_to_cache(fn_name="chat.completions.create",kw=kw,response=chat_completion,backend=cache_backend,)if self._should_use_direct_mode and not in_cache:response_format = kw.get("response_format")if response_format is not None:kw["response_format"] = response_format.model_json_schema()unify.log_query(endpoint=f"{endpoint}@openai",query_body=kw,response_body=chat_completion.model_dump(),consume_credits=True,)if return_full_completion:if endpoint == "user-input":input_msg = sum(len(msg) for msg in prompt.components["messages"])return ChatCompletion(id=str(uuid.uuid4()),object="chat.completion",created=int(time.time()),model=endpoint,choices=[Choice(index=0,message=ChatCompletionMessage(role="assistant",content=chat_completion,),finish_reason="stop",),],usage=CompletionUsage(prompt_tokens=input_msg,completion_tokens=len(chat_completion),total_tokens=input_msg + len(chat_completion),),)return chat_completionelif endpoint == "user-input":return chat_completioncontent = chat_completion.choices[0].message.contentif content:return content.strip(" ")return ""
32
148
12
737
0
1,050
1,209
1,050
self,endpoint,prompt,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion,cache,cache_backend
[]
Union[str, ChatCompletion]
{"Assign": 19, "Expr": 8, "If": 19, "Return": 6, "Try": 1}
41
160
41
["self._handle_kw", "kw.pop", "isinstance", "cache.endswith", "cache.removesuffix", "input", "_get_cache", "unify.traced", "join", "str", "_get_cache", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "chat_method", "print", "threading.get_ident", "Exception", "_write_to_cache", "kw.get", "response_format.model_json_schema", "unify.log_query", "chat_completion.model_dump", "sum", "len", "ChatCompletion", "str", "uuid.uuid4", "int", "time.time", "Choice", "ChatCompletionMessage", "CompletionUsage", "len", "len", "content.strip"]
0
[]
The function (_generate_non_stream) defined within the public class called Unify, that inherit another class.The function start at line 1050 and ends at 1209. It contains 148 lines of code and it has a cyclomatic complexity of 32. It takes 12 parameters, represented as [1050.0] and does not return any value. It declares 41.0 functions, and It has 41.0 functions called inside which are ["self._handle_kw", "kw.pop", "isinstance", "cache.endswith", "cache.removesuffix", "input", "_get_cache", "unify.traced", "join", "str", "_get_cache", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "chat_method", "print", "threading.get_ident", "Exception", "_write_to_cache", "kw.get", "response_format.model_json_schema", "unify.log_query", "chat_completion.model_dump", "sum", "len", "ChatCompletion", "str", "uuid.uuid4", "int", "time.time", "Choice", "ChatCompletionMessage", "CompletionUsage", "len", "len", "content.strip"].
unifyai_unify
Unify
public
0
1
_generate
def _generate(# noqa: WPS234, WPS211self,messages: Optional[List[ChatCompletionMessageParam]],*,frequency_penalty: Optional[float],logit_bias: Optional[Dict[str, int]],logprobs: Optional[bool],top_logprobs: Optional[int],max_completion_tokens: Optional[int],n: Optional[int],presence_penalty: Optional[float],response_format: Optional[Union[Type[BaseModel], Dict[str, str]]],seed: Optional[int],stop: Union[Optional[str], List[str]],stream: Optional[bool],stream_options: Optional[ChatCompletionStreamOptionsParam],temperature: Optional[float],top_p: Optional[float],service_tier: Optional[str],tools: Optional[Iterable[ChatCompletionToolParam]],tool_choice: Optional[ChatCompletionToolChoiceOptionParam],parallel_tool_calls: Optional[bool],reasoning_effort: Optional[str],# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client argumentsreturn_full_completion: bool,cache: Union[bool, str],cache_backend: str,# passthrough argumentsextra_headers: Optional[Headers],extra_query: Optional[Query],**kwargs,) -> Union[Generator[str, None, None], str]:# noqa: DAR101, DAR201, DAR401prompt = Prompt(messages=messages,frequency_penalty=frequency_penalty,logit_bias=logit_bias,logprobs=logprobs,top_logprobs=top_logprobs,max_completion_tokens=max_completion_tokens,n=n,presence_penalty=presence_penalty,response_format=response_format,seed=seed,stop=stop,temperature=temperature,top_p=top_p,service_tier=service_tier,tools=tools,tool_choice=tool_choice,parallel_tool_calls=parallel_tool_calls,reasoning_effort=reasoning_effort,extra_headers=extra_headers,extra_query=extra_query,extra_body=kwargs,)if stream:return self._generate_stream(self._endpoint,prompt,# streamstream_options=stream_options,# platform argumentsuse_custom_keys=use_custom_keys,tags=tags,drop_params=drop_params,region=region,log_query_body=log_query_body,log_response_body=log_response_body,# python client argumentsreturn_full_completion=return_full_completion,)return self._generate_non_stream(self._endpoint,prompt,# platform argumentsuse_custom_keys=use_custom_keys,tags=tags,drop_params=drop_params,region=region,log_query_body=log_query_body,log_response_body=log_response_body,# python client argumentsreturn_full_completion=return_full_completion,cache=cache,cache_backend=cache_backend,)
2
85
33
454
0
1,211
1,303
1,211
self,messages,frequency_penalty,logit_bias,logprobs,top_logprobs,max_completion_tokens,n,presence_penalty,response_format,seed,stop,stream,stream_options,temperature,top_p,service_tier,tools,tool_choice,parallel_tool_calls,reasoning_effort,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion,cache,cache_backend,extra_headers,extra_query,**kwargs
[]
Union[Generator[str, None, None], str]
{"Assign": 1, "If": 1, "Return": 2}
3
93
3
["Prompt", "self._generate_stream", "self._generate_non_stream"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.i18n_py.MsgDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_transform_py._simplify", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.input_py.HTMLParser.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.input_py.XMLParser.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.path_py.Path.select", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.directives_py.AttrsDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.directives_py.StripDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69267540_fe1ixxu_bibert.fairseq.sequence_generator_py.SequenceGeneratorWithAlignment.generate"]
The function (_generate) defined within the public class called Unify, that inherit another class.The function start at line 1211 and ends at 1303. It contains 85 lines of code and it has a cyclomatic complexity of 2. It takes 33 parameters, represented as [1211.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called inside which are ["Prompt", "self._generate_stream", "self._generate_non_stream"], It has 8.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.i18n_py.MsgDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_transform_py._simplify", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.input_py.HTMLParser.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.input_py.XMLParser.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.path_py.Path.select", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.directives_py.AttrsDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.directives_py.StripDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69267540_fe1ixxu_bibert.fairseq.sequence_generator_py.SequenceGeneratorWithAlignment.generate"].
unifyai_unify
Unify
public
0
1
to_async_client
def to_async_client(self):"""Return an asynchronous version of the client (`AsyncUnify` instance), with theexact same configuration as this synchronous (`Unify`) client.Returns:An `AsyncUnify` instance with the same configuration as this `Unify`instance."""return AsyncUnify(**self._constructor_args)
1
2
1
14
0
1,305
1,314
1,305
self
[]
Returns
{"Expr": 1, "Return": 1}
1
10
1
["AsyncUnify"]
0
[]
The function (to_async_client) defined within the public class called Unify, that inherit another class.The function start at line 1305 and ends at 1314. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function called inside which is ["AsyncUnify"].
unifyai_unify
_UniClient
protected
1
1
_get_client
def _get_client(self):try:# Async event hooks must use AsyncClienthttp_client = make_async_httpx_client_for_unify_logging(BASE_URL)if self._should_use_direct_mode:return openai.AsyncOpenAI(api_key=self._openai_api_key,timeout=3600.0,# one hourhttp_client=http_client,)return openai.AsyncOpenAI(base_url=f"{BASE_URL}",api_key=self._api_key,timeout=3600.0,# one hourhttp_client=http_client,)except openai.APIStatusError as e:raise Exception(f"Failed to initialize Unify client: {str(e)}")
3
17
1
80
0
1,321
1,338
1,321
self
[]
None
{}
0
2
0
[]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.init_avp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.update_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py._get_client_uuid", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_all_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_permissions_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_resources_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_scopes_command"]
The function (_get_client) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 1321 and ends at 1338. It contains 17 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It has 8.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.init_avp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws.auth_manager.cli.avp_commands_py.update_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py._get_client_uuid", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_all_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_permissions_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_resources_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.keycloak.src.airflow.providers.keycloak.auth_manager.cli.commands_py.create_scopes_command"].
unifyai_unify
Unify
public
0
1
_generate_stream
async def _generate_stream(self,endpoint: str,prompt: Prompt,# streamstream_options: Optional[ChatCompletionStreamOptionsParam],# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client argumentsreturn_full_completion: bool,) -> AsyncGenerator[str, None]:kw = self._handle_kw(prompt=prompt,endpoint=endpoint,stream=True,stream_options=stream_options,use_custom_keys=use_custom_keys,tags=tags,drop_params=drop_params,region=region,log_query_body=log_query_body,log_response_body=log_response_body,)if self._should_use_direct_mode:kw.pop("extra_body")try:if endpoint in LOCAL_MODELS:kw.pop("extra_body")kw.pop("model")kw.pop("max_completion_tokens")async_stream = await LOCAL_MODELS[endpoint](**kw)else:if unify.CLIENT_LOGGING:print(f"calling {kw['model']}... (thread {threading.get_ident()})")if self._traced:# ToDo: test if this works, it probably won'tasync_stream = await unify.traced(self._client.chat.completions.create,span_type="llm-stream",name=(endpointif tags is Noneelse endpoint + "[" + ",".join([str(t) for t in tags]) + "]"),)(**kw)else:async_stream = await self._client.chat.completions.create(**kw)if unify.CLIENT_LOGGING:print(f"done (thread {threading.get_ident()})")async for chunk in async_stream:# type: ignore[union-attr]if return_full_completion:yield chunkelse:yield chunk.choices[0].delta.content or ""except openai.APIStatusError as e:raise Exception(e.message)
12
57
11
311
0
1,340
1,400
1,340
self,endpoint,prompt,stream_options,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion
[]
Generator[str, None, None]
{"Assign": 6, "Expr": 7, "For": 1, "If": 7, "Try": 1}
14
62
14
["self._handle_kw", "kw.pop", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "self._client.chat.completions.create", "print", "threading.get_ident", "Exception"]
0
[]
The function (_generate_stream) defined within the public class called Unify, that inherit another class.The function start at line 1340 and ends at 1400. It contains 57 lines of code and it has a cyclomatic complexity of 12. It takes 11 parameters, represented as [1340.0] and does not return any value. It declares 14.0 functions, and It has 14.0 functions called inside which are ["self._handle_kw", "kw.pop", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "self._client.chat.completions.create", "print", "threading.get_ident", "Exception"].
unifyai_unify
public
public
0
0
_generate_non_stream._get_cache_traced
def _get_cache_traced(**kw):return _get_cache(fn_name="chat.completions.create",kw=kw,raise_on_empty=cache == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=cache_backend,)
1
9
1
36
0
1,448
1,456
1,097
null
[]
None
null
0
0
0
null
0
null
The function (_generate_non_stream._get_cache_traced) defined within the public class called public.The function start at line 1448 and ends at 1456. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
Unify
public
0
1
_generate_non_stream
async def _generate_non_stream(self,endpoint: str,prompt: Prompt,# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client argumentsreturn_full_completion: bool,cache: Union[bool, str],cache_backend: str,) -> Union[str, ChatCompletion]:kw = self._handle_kw(prompt=prompt,endpoint=endpoint,stream=False,stream_options=None,use_custom_keys=use_custom_keys,tags=tags,drop_params=drop_params,region=region,log_query_body=log_query_body,log_response_body=log_response_body,)if self._should_use_direct_mode:kw.pop("extra_body")if isinstance(cache, str) and cache.endswith("-closest"):cache = cache.removesuffix("-closest")read_closest = Trueelse:read_closest = Falseif "response_format" in kw and kw["response_format"]:chat_method = self._client.beta.chat.completions.parseif "stream" in kw:del kw["stream"]# .parse() does not accept the stream argumentelse:chat_method = self._client.chat.completions.createchat_completion = Nonein_cache = Falseif cache in [True, "both", "read", "read-only"]:if self._traced:def _get_cache_traced(**kw):return _get_cache(fn_name="chat.completions.create",kw=kw,raise_on_empty=cache == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=cache_backend,)chat_completion = unify.traced(_get_cache_traced,span_type="llm-cached",name=(endpointif tags is Noneelse endpoint + "[" + ",".join([str(t) for t in tags]) + "]"),)(**kw)else:chat_completion = _get_cache(fn_name="chat.completions.create",kw=kw,raise_on_empty=cache == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=cache_backend,)in_cache = True if chat_completion is not None else Falseif chat_completion is None:try:if endpoint in LOCAL_MODELS:kw.pop("extra_body")kw.pop("model")kw.pop("max_completion_tokens")chat_completion = await LOCAL_MODELS[endpoint](**kw)else:if unify.CLIENT_LOGGING:print(f"calling {kw['model']}... (thread {threading.get_ident()})",)if self.traced:chat_completion = await unify.traced(chat_method,span_type="llm",name=(endpointif tags is Noneelse endpoint+ "["+ ",".join([str(t) for t in tags])+ "]"),fn_type="async",)(**kw)else:chat_completion = await chat_method(**kw,)if unify.CLIENT_LOGGING:print(f"done (thread {threading.get_ident()})",)except openai.APIStatusError as e:raise Exception(e.message)if (chat_completion is not None or read_closest) and cache in [True,"both","write",]:if not in_cache or cache == "write":_write_to_cache(fn_name="chat.completions.create",kw=kw,response=chat_completion,backend=cache_backend,)if self._should_use_direct_mode and not in_cache:response_format = kw.get("response_format")if response_format is not None:kw["response_format"] = response_format.model_json_schema()asyncio.create_task(asyncio.to_thread(unify.log_query,endpoint=f"{endpoint}@openai",query_body=kw,response_body=chat_completion.model_dump(),consume_credits=True,),name="unify_client_log_query",)if return_full_completion:return chat_completioncontent = chat_completion.choices[0].message.contentif content:return content.strip(" ")return ""
30
131
12
631
0
1,402
1,544
1,402
self,endpoint,prompt,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion,cache,cache_backend
[]
Union[str, ChatCompletion]
{"Assign": 19, "Expr": 8, "If": 19, "Return": 6, "Try": 1}
41
160
41
["self._handle_kw", "kw.pop", "isinstance", "cache.endswith", "cache.removesuffix", "input", "_get_cache", "unify.traced", "join", "str", "_get_cache", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "chat_method", "print", "threading.get_ident", "Exception", "_write_to_cache", "kw.get", "response_format.model_json_schema", "unify.log_query", "chat_completion.model_dump", "sum", "len", "ChatCompletion", "str", "uuid.uuid4", "int", "time.time", "Choice", "ChatCompletionMessage", "CompletionUsage", "len", "len", "content.strip"]
0
[]
The function (_generate_non_stream) defined within the public class called Unify, that inherit another class.The function start at line 1402 and ends at 1544. It contains 131 lines of code and it has a cyclomatic complexity of 30. It takes 12 parameters, represented as [1402.0] and does not return any value. It declares 41.0 functions, and It has 41.0 functions called inside which are ["self._handle_kw", "kw.pop", "isinstance", "cache.endswith", "cache.removesuffix", "input", "_get_cache", "unify.traced", "join", "str", "_get_cache", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "chat_method", "print", "threading.get_ident", "Exception", "_write_to_cache", "kw.get", "response_format.model_json_schema", "unify.log_query", "chat_completion.model_dump", "sum", "len", "ChatCompletion", "str", "uuid.uuid4", "int", "time.time", "Choice", "ChatCompletionMessage", "CompletionUsage", "len", "len", "content.strip"].
unifyai_unify
Unify
public
0
1
_generate
async def _generate(# noqa: WPS234, WPS211self,messages: Optional[List[ChatCompletionMessageParam]],*,frequency_penalty: Optional[float],logit_bias: Optional[Dict[str, int]],logprobs: Optional[bool],top_logprobs: Optional[int],max_completion_tokens: Optional[int],n: Optional[int],presence_penalty: Optional[float],response_format: Optional[Union[Type[BaseModel], Dict[str, str]]],seed: Optional[int],stop: Union[Optional[str], List[str]],stream: Optional[bool],stream_options: Optional[ChatCompletionStreamOptionsParam],temperature: Optional[float],top_p: Optional[float],tools: Optional[Iterable[ChatCompletionToolParam]],tool_choice: Optional[ChatCompletionToolChoiceOptionParam],parallel_tool_calls: Optional[bool],reasoning_effort: Optional[str],# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client argumentsreturn_full_completion: bool,cache: Union[bool, str],cache_backend: str,# passthrough argumentsextra_headers: Optional[Headers],extra_query: Optional[Query],service_tier: Optional[str] = None,**kwargs,) -> Union[AsyncGenerator[str, None], str]:# noqa: DAR101, DAR201, DAR401prompt = Prompt(messages=messages,frequency_penalty=frequency_penalty,logit_bias=logit_bias,logprobs=logprobs,top_logprobs=top_logprobs,max_completion_tokens=max_completion_tokens,n=n,presence_penalty=presence_penalty,response_format=response_format,seed=seed,stop=stop,temperature=temperature,top_p=top_p,tools=tools,tool_choice=tool_choice,parallel_tool_calls=parallel_tool_calls,extra_headers=extra_headers,extra_query=extra_query,extra_body=kwargs,reasoning_effort=reasoning_effort,service_tier=service_tier,)if stream:return self._generate_stream(self._endpoint,prompt,# streamstream_options=stream_options,# platform argumentsuse_custom_keys=use_custom_keys,tags=tags,drop_params=drop_params,region=region,log_query_body=log_query_body,log_response_body=log_response_body,# python client argumentsreturn_full_completion=return_full_completion,)return await self._generate_non_stream(self._endpoint,prompt,# platform argumentsuse_custom_keys=use_custom_keys,tags=tags,drop_params=drop_params,region=region,log_query_body=log_query_body,log_response_body=log_response_body,# python client argumentsreturn_full_completion=return_full_completion,cache=cache,cache_backend=cache_backend,)
2
85
33
455
0
1,546
1,638
1,546
self,messages,frequency_penalty,logit_bias,logprobs,top_logprobs,max_completion_tokens,n,presence_penalty,response_format,seed,stop,stream,stream_options,temperature,top_p,service_tier,tools,tool_choice,parallel_tool_calls,reasoning_effort,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion,cache,cache_backend,extra_headers,extra_query,**kwargs
[]
Union[Generator[str, None, None], str]
{"Assign": 1, "If": 1, "Return": 2}
3
93
3
["Prompt", "self._generate_stream", "self._generate_non_stream"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.i18n_py.MsgDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_transform_py._simplify", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.input_py.HTMLParser.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.input_py.XMLParser.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.path_py.Path.select", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.directives_py.AttrsDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.directives_py.StripDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69267540_fe1ixxu_bibert.fairseq.sequence_generator_py.SequenceGeneratorWithAlignment.generate"]
The function (_generate) defined within the public class called Unify, that inherit another class.The function start at line 1546 and ends at 1638. It contains 85 lines of code and it has a cyclomatic complexity of 2. It takes 33 parameters, represented as [1546.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called inside which are ["Prompt", "self._generate_stream", "self._generate_non_stream"], It has 8.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.i18n_py.MsgDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_transform_py._simplify", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.input_py.HTMLParser.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.input_py.XMLParser.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.path_py.Path.select", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.directives_py.AttrsDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.template.directives_py.StripDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69267540_fe1ixxu_bibert.fairseq.sequence_generator_py.SequenceGeneratorWithAlignment.generate"].
unifyai_unify
AsyncUnify
public
0
1
to_sync_client
def to_sync_client(self):"""Return a synchronous version of the client (`Unify` instance), with theexact same configuration as this asynchronous (`AsyncUnify`) client.Returns:A `Unify` instance with the same configuration as this `AsyncUnify`instance."""return Unify(**self._constructor_args)
1
2
1
14
0
1,640
1,649
1,640
self
[]
Returns
{"Expr": 1, "Return": 1}
1
10
1
["Unify"]
0
[]
The function (to_sync_client) defined within the public class called AsyncUnify, that inherit another class.The function start at line 1640 and ends at 1649. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function called inside which is ["Unify"].
unifyai_unify
AsyncUnify
public
0
1
close
async def close(self):"""Close the underlying client."""await self._client.close()
1
2
1
14
0
1,651
1,655
1,651
self
[]
None
{"Expr": 2}
1
5
1
["self._client.close"]
97
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.transaction.transaction_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3524351_devassistant_devassistant.test.integration.misc_py.DATestFileEnvironment.populate_dapath", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3524351_devassistant_devassistant.test.test_command_runners_py.TestDotDevassistantCommandRunner.test_dda_w_takes_section_as_literal", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3524351_devassistant_devassistant.test.test_command_runners_py.TestDotDevassistantCommandRunner.test_list_and_dict_inputs_are_same", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3524351_devassistant_devassistant.test.test_command_runners_py.TestSetupProjectDirCommandRunner.test_fails_when_dir_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3531886_donschoe_p2pool_n.p2pool.util.logging_py.LogFile.reopen", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535444_stormpath_stormpath_flask.tests.test_settings_py.TestCheckSettings.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660739_pret_pokemon_reverse_engineering_tools.pokemontools.png_py.Image.save", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3666318_steemit_hivemind.hive.server.serve_py.run_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675353_recipy_recipy.integration_test.test_recipyrc_py.TestRecipyrc.test_data_file_diff_outputs_diff", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3677969_eventbrite_pysoa.pysoa.server.django.cache_py.PySOAMemcachedCache.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3677969_eventbrite_pysoa.pysoa.server.django.cache_py.PySOAPyLibMCCache.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3698306_openstack_oslo_log.oslo_log.pipe_mutex_py._AsyncioMutex.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3698306_openstack_oslo_log.oslo_log.pipe_mutex_py._ReallyPipeMutex.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701004_elfi_dev_elfi.tests.unit.test_store_py.test_npy_store", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3711514_c0d3d3v_moodle_downloader_2.moodle_dl.utils_py.PathTools.touch_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3712295_dalibo_temboard_agent.tests.func.test_statements_py.xsession", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716566_pyvisa_pyvisa_py.pyvisa_py.prologix_py._PrologixIntfcSession.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716566_pyvisa_pyvisa_py.pyvisa_py.protocols.rpc_py.TCPServer.forksession", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718341_wolph_numpy_stl.tests.test_mesh_properties_py.test_mass_properties_for_half_donut", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718341_wolph_numpy_stl.tests.test_mesh_properties_py.test_mass_properties_for_half_donut_with_density", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718341_wolph_numpy_stl.tests.test_mesh_properties_py.test_mass_properties_for_moon", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718341_wolph_numpy_stl.tests.test_mesh_properties_py.test_mass_properties_for_star", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913818_randy3k_radian.radian.app_py.RadianApplication.set_env_vars"]
The function (close) defined within the public class called AsyncUnify, that inherit another class.The function start at line 1651 and ends at 1655. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which is ["self._client.close"], It has 97.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.transaction.transaction_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3524351_devassistant_devassistant.test.integration.misc_py.DATestFileEnvironment.populate_dapath", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3524351_devassistant_devassistant.test.test_command_runners_py.TestDotDevassistantCommandRunner.test_dda_w_takes_section_as_literal", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3524351_devassistant_devassistant.test.test_command_runners_py.TestDotDevassistantCommandRunner.test_list_and_dict_inputs_are_same", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3524351_devassistant_devassistant.test.test_command_runners_py.TestSetupProjectDirCommandRunner.test_fails_when_dir_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3531886_donschoe_p2pool_n.p2pool.util.logging_py.LogFile.reopen", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535444_stormpath_stormpath_flask.tests.test_settings_py.TestCheckSettings.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660739_pret_pokemon_reverse_engineering_tools.pokemontools.png_py.Image.save", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3666318_steemit_hivemind.hive.server.serve_py.run_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675353_recipy_recipy.integration_test.test_recipyrc_py.TestRecipyrc.test_data_file_diff_outputs_diff", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3677969_eventbrite_pysoa.pysoa.server.django.cache_py.PySOAMemcachedCache.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3677969_eventbrite_pysoa.pysoa.server.django.cache_py.PySOAPyLibMCCache.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3698306_openstack_oslo_log.oslo_log.pipe_mutex_py._AsyncioMutex.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3698306_openstack_oslo_log.oslo_log.pipe_mutex_py._ReallyPipeMutex.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701004_elfi_dev_elfi.tests.unit.test_store_py.test_npy_store", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3711514_c0d3d3v_moodle_downloader_2.moodle_dl.utils_py.PathTools.touch_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3712295_dalibo_temboard_agent.tests.func.test_statements_py.xsession", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716566_pyvisa_pyvisa_py.pyvisa_py.prologix_py._PrologixIntfcSession.close", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716566_pyvisa_pyvisa_py.pyvisa_py.protocols.rpc_py.TCPServer.forksession", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718341_wolph_numpy_stl.tests.test_mesh_properties_py.test_mass_properties_for_half_donut", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718341_wolph_numpy_stl.tests.test_mesh_properties_py.test_mass_properties_for_half_donut_with_density", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718341_wolph_numpy_stl.tests.test_mesh_properties_py.test_mass_properties_for_moon", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718341_wolph_numpy_stl.tests.test_mesh_properties_py.test_mass_properties_for_star", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913818_randy3k_radian.radian.app_py.RadianApplication.set_env_vars"].
unifyai_unify
Prompt
public
0
0
__init__
def __init__(self,**components,):"""Create Prompt instance.Args:components: All components of the prompt.Returns:The Prompt instance."""self.components = components
1
5
2
15
0
2
15
2
self,**components
[]
None
{"Assign": 1, "Expr": 1}
0
14
0
[]
14,667
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ParameterValidationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.RequestError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.http_client_py.HTTPClient.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Command.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Group.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._context_py.Context.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._option_groups_py.OptionGroupMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Argument.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Option.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._sections_py.SectionMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._util_py.FrozenSpaceMeta.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.AcceptBetween.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.RequireExactly.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._support_py.ConstraintMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.ConstraintViolated.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.UnsatisfiableConstraint.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.formatting._formatter_py.HelpFormatter.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.tests.test_commands_py.test_group_command_class_is_used_to_create_subcommands", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.explorer_py.MainWindow.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.search_filter_py.QudFilterModel.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudObjTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudPopTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudTreeView.__init__"]
The function (__init__) defined within the public class called Prompt.The function start at line 2 and ends at 15. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2.0] and does not return any value. It has 14667.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ParameterValidationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.RequestError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.http_client_py.HTTPClient.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Command.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Group.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._context_py.Context.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._option_groups_py.OptionGroupMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Argument.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Option.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._sections_py.SectionMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._util_py.FrozenSpaceMeta.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.AcceptBetween.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.RequireExactly.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._support_py.ConstraintMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.ConstraintViolated.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.UnsatisfiableConstraint.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.formatting._formatter_py.HelpFormatter.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.tests.test_commands_py.test_group_command_class_is_used_to_create_subcommands", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.explorer_py.MainWindow.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.search_filter_py.QudFilterModel.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudObjTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudPopTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudTreeView.__init__"].
unifyai_unify
public
public
0
0
get_credits
def get_credits(*, api_key: Optional[str] = None) -> float:"""Returns the credits remaining in the user account, in USD.Args:api_key: If specified, unify API key to be used. Defaults to the value in the`UNIFY_KEY` environment variable.Returns:The credits remaining in USD.Raises:ValueError: If there was an HTTP error."""headers = _create_request_header(api_key)response = http.get(BASE_URL + "/credits", headers=headers)if response.status_code != 200:raise Exception(response.json())return _res_to_list(response)["credits"]
2
6
1
61
2
9
26
9
api_key
['headers', 'response']
float
{"Assign": 2, "Expr": 1, "If": 1, "Return": 1}
5
18
5
["_create_request_header", "http.get", "Exception", "response.json", "_res_to_list"]
0
[]
The function (get_credits) defined within the public class called public.The function start at line 9 and ends at 26. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.get", "Exception", "response.json", "_res_to_list"].
unifyai_unify
public
public
0
0
create_custom_api_key
def create_custom_api_key(name: str,value: str,*,api_key: Optional[str] = None,) -> Dict[str, str]:"""Create a custom API key.Args:name: Name of the API key.value: Value of the API key.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response information."""headers = _create_request_header(api_key)url = f"{BASE_URL}/custom_api_key"params = {"name": name, "value": value}response = http.post(url, headers=headers, params=params)if response.status_code != 200:raise Exception(response.json())return response.json()
2
13
3
90
4
9
37
9
name,value,api_key
['headers', 'url', 'response', 'params']
Dict[str, str]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
29
5
["_create_request_header", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (create_custom_api_key) defined within the public class called public.The function start at line 9 and ends at 37. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [9.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.post", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
get_custom_api_key
def get_custom_api_key(name: str,*,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Get the value of a custom API key.Args:name: Name of the API key to get the value for.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the custom API key information.Raises:requests.HTTPError: If the request fails."""headers = _create_request_header(api_key)url = f"{BASE_URL}/custom_api_key"params = {"name": name}response = http.get(url, headers=headers, params=params)if response.status_code != 200:raise Exception(response.json())return response.json()
2
12
2
82
4
40
67
40
name,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
28
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (get_custom_api_key) defined within the public class called public.The function start at line 40 and ends at 67. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [40.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.get", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
delete_custom_api_key
def delete_custom_api_key(name: str,*,api_key: Optional[str] = None,) -> Dict[str, str]:"""Delete a custom API key.Args:name: Name of the custom API key to delete.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response message if successful.Raises:requests.HTTPError: If the API request fails.KeyError: If the API key is not found."""headers = _create_request_header(api_key)url = f"{BASE_URL}/custom_api_key"params = {"name": name}response = http.delete(url, headers=headers, params=params)if response.status_code == 200:return response.json()elif response.status_code == 404:raise KeyError("API key not found.")else:if response.status_code != 200:raise Exception(response.json())
4
16
2
103
4
70
103
70
name,api_key
['headers', 'url', 'response', 'params']
Dict[str, str]
{"Assign": 4, "Expr": 1, "If": 3, "Return": 1}
6
34
6
["_create_request_header", "http.delete", "response.json", "KeyError", "Exception", "response.json"]
0
[]
The function (delete_custom_api_key) defined within the public class called public.The function start at line 70 and ends at 103. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [70.0] and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["_create_request_header", "http.delete", "response.json", "KeyError", "Exception", "response.json"].
unifyai_unify
public
public
0
0
rename_custom_api_key
def rename_custom_api_key(name: str,new_name: str,*,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Rename a custom API key.Args:name: Name of the custom API key to be updated.new_name: New name for the custom API key.api_key: If specified, unify API key to be used. Defaults to the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response information.Raises:requests.HTTPError: If the API request fails.KeyError: If the API key is not provided or found in environment variables."""headers = _create_request_header(api_key)url = f"{BASE_URL}/custom_api_key/rename"params = {"name": name, "new_name": new_name}response = http.post(url, headers=headers, params=params)if response.status_code != 200:raise Exception(response.json())return response.json()
2
13
3
90
4
106
137
106
name,new_name,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
32
5
["_create_request_header", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (rename_custom_api_key) defined within the public class called public.The function start at line 106 and ends at 137. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [106.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.post", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
list_custom_api_keys
def list_custom_api_keys(*,api_key: Optional[str] = None,) -> List[Dict[str, str]]:"""Get a list of custom API keys associated with the user's account.Args:api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A list of dictionaries containing custom API key information.Each dictionary has 'name' and 'value' keys."""headers = _create_request_header(api_key)url = f"{BASE_URL}/custom_api_key/list"response = http.get(url, headers=headers)if response.status_code != 200:raise Exception(response.json())return response.json()
2
10
1
70
3
140
163
140
api_key
['headers', 'url', 'response']
List[Dict[str, str]]
{"Assign": 3, "Expr": 1, "If": 1, "Return": 1}
5
24
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (list_custom_api_keys) defined within the public class called public.The function start at line 140 and ends at 163. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.get", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
create_custom_endpoint
def create_custom_endpoint(*,name: str,url: str,key_name: str,model_name: Optional[str] = None,provider: Optional[str] = None,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Create a custom endpoint for API calls.Args:name: Alias for the custom endpoint. This will be the name used to call the endpoint.url: Base URL of the endpoint being called. Must support the OpenAI format.key_name: Name of the API key that will be passed as part of the query.model_name: Name passed to the custom endpoint as model name. If not specified, it will default to the endpoint alias.provider: If the custom endpoint is for a fine-tuned model which is hosted directly via one of the supported providers,then this argument should be specified as the provider used.api_key: If specified, unify API key to be used. Defaults to the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response from the API.Raises:requests.HTTPError: If the API request fails.KeyError: If the UNIFY_KEY is not set and no api_key is provided."""headers = _create_request_header(api_key)params = {"name": name,"url": url,"key_name": key_name,}if model_name:params["model_name"] = model_nameif provider:params["provider"] = providerresponse = http.post(f"{BASE_URL}/custom_endpoint",headers=headers,params=params,)if response.status_code != 200:raise Exception(response.json())return response.json()
4
27
6
133
3
12
61
12
name,url,key_name,model_name,provider,api_key
['headers', 'response', 'params']
Dict[str, Any]
{"Assign": 5, "Expr": 1, "If": 3, "Return": 1}
5
50
5
["_create_request_header", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (create_custom_endpoint) defined within the public class called public.The function start at line 12 and ends at 61. It contains 27 lines of code and it has a cyclomatic complexity of 4. It takes 6 parameters, represented as [12.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.post", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
delete_custom_endpoint
def delete_custom_endpoint(name: str,*,api_key: Optional[str] = None,) -> Dict[str, str]:"""Delete a custom endpoint.Args:name: Name of the custom endpoint to delete.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response message.Raises:requests.HTTPError: If the API request fails."""headers = _create_request_header(api_key)url = f"{BASE_URL}/custom_endpoint"params = {"name": name}response = http.delete(url, headers=headers, params=params)if response.status_code != 200:raise Exception(response.json())return response.json()
2
12
2
82
4
64
92
64
name,api_key
['headers', 'url', 'response', 'params']
Dict[str, str]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
29
5
["_create_request_header", "http.delete", "Exception", "response.json", "response.json"]
0
[]
The function (delete_custom_endpoint) defined within the public class called public.The function start at line 64 and ends at 92. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [64.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.delete", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
rename_custom_endpoint
def rename_custom_endpoint(name: str,new_name: str,*,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Rename a custom endpoint.Args:name: Name of the custom endpoint to be updated.new_name: New name for the custom endpoint.api_key: If specified, unify API key to be used. Defaults to the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response information.Raises:requests.HTTPError: If the API request fails."""headers = _create_request_header(api_key)url = f"{BASE_URL}/custom_endpoint/rename"params = {"name": name, "new_name": new_name}response = http.post(url, headers=headers, params=params)if response.status_code != 200:raise Exception(response.json())return response.json()
2
13
3
90
4
95
125
95
name,new_name,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
31
5
["_create_request_header", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (rename_custom_endpoint) defined within the public class called public.The function start at line 95 and ends at 125. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [95.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.post", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
list_custom_endpoints
def list_custom_endpoints(*,api_key: Optional[str] = None,) -> List[Dict[str, str]]:"""Get a list of custom endpoints for the authenticated user.Args:api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A list of dictionaries containing information about custom endpoints.Each dictionary has keys: 'name', 'mdl_name', 'url', and 'key'.Raises:requests.exceptions.RequestException: If the API request fails."""headers = _create_request_header(api_key)url = f"{BASE_URL}/custom_endpoint/list"response = http.get(url, headers=headers)if response.status_code != 200:raise Exception(response.json())return response.json()
2
10
1
70
3
128
153
128
api_key
['headers', 'url', 'response']
List[Dict[str, str]]
{"Assign": 3, "Expr": 1, "If": 1, "Return": 1}
5
26
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (list_custom_endpoints) defined within the public class called public.The function start at line 128 and ends at 153. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.get", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
_unify_requests_debug_enabled
def _unify_requests_debug_enabled() -> bool:return os.getenv("UNIFY_REQUESTS_DEBUG", "false").lower() in ("true", "1")
1
2
0
25
0
9
10
9
[]
bool
{"Return": 1}
2
2
2
["lower", "os.getenv"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.httpx_logging_py.make_async_httpx_client_for_unify_logging", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.httpx_logging_py.make_httpx_client_for_unify_logging"]
The function (_unify_requests_debug_enabled) defined within the public class called public.The function start at line 9 and ends at 10. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["lower", "os.getenv"], It has 2.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.httpx_logging_py.make_async_httpx_client_for_unify_logging", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.httpx_logging_py.make_httpx_client_for_unify_logging"].
unifyai_unify
public
public
0
0
make_httpx_client_for_unify_logging._is_unify_chat_request
def _is_unify_chat_request(request: httpx.Request) -> bool:try:if request.url.host != base_host or request.url.scheme != base_scheme:return Falsereturn request.url.path.endswith("/chat/completions")except Exception:return False
4
7
1
48
0
23
29
23
null
[]
None
null
0
0
0
null
0
null
The function (make_httpx_client_for_unify_logging._is_unify_chat_request) defined within the public class called public.The function start at line 23 and ends at 29. It contains 7 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_httpx_client_for_unify_logging._pre_request_log
def _pre_request_log(request: httpx.Request) -> None:try:if not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)headers = dict(request.headers)# normalize Authorization header key for masking in http._logauth_val = headers.get("Authorization", headers.get("authorization"))if auth_val is not None:headers["Authorization"] = auth_valif "authorization" in headers:try:del headers["authorization"]except Exception:passparams = dict(request.url.params)body_json = Noneif request.content:try:body_json = json.loads((request.content.decode("utf-8")if isinstance(request.content, (bytes, bytearray))else request.content),)except Exception:body_json = Nonekw = {"headers": headers}if params:kw["params"] = paramsif body_json is not None:kw["json"] = body_json_unify_requests._log(method, url_str, True, **kw)except Exception:pass
11
36
1
195
0
31
70
31
null
[]
None
null
0
0
0
null
0
null
The function (make_httpx_client_for_unify_logging._pre_request_log) defined within the public class called public.The function start at line 31 and ends at 70. It contains 36 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_httpx_client_for_unify_logging._post_response_log
def _post_response_log(response: httpx.Response) -> None:try:request = response.requestif not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)is_stream = Falsetry:req_body = Noneif request.content:try:req_body = json.loads((request.content.decode("utf-8")if isinstance(request.content, (bytes, bytearray))else request.content),)except Exception:req_body = Noneif isinstance(req_body, dict) and req_body.get("stream") is True:is_stream = Trueif "text/event-stream" in (response.headers.get("content-type", "").lower()):is_stream = Trueexcept Exception:passif is_stream:_unify_requests._log(f"{method} response:{response.status_code}",url_str,True,response={},)returntry:response.read()except Exception:passtry:payload = response.json()except Exception:return_unify_requests._log(f"{method} response:{response.status_code}",url_str,response=payload,)except Exception:pass
13
52
1
209
0
72
126
72
null
[]
None
null
0
0
0
null
0
null
The function (make_httpx_client_for_unify_logging._post_response_log) defined within the public class called public.The function start at line 72 and ends at 126. It contains 52 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_httpx_client_for_unify_logging
def make_httpx_client_for_unify_logging(base_url: str) -> Optional[httpx.Client]:if not _unify_requests_debug_enabled():return Nonefrom unify.utils import http as _unify_requestsparsed = urlparse(base_url)base_host = parsed.hostnamebase_scheme = parsed.schemedef _is_unify_chat_request(request: httpx.Request) -> bool:try:if request.url.host != base_host or request.url.scheme != base_scheme:return Falsereturn request.url.path.endswith("/chat/completions")except Exception:return Falsedef _pre_request_log(request: httpx.Request) -> None:try:if not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)headers = dict(request.headers)# normalize Authorization header key for masking in http._logauth_val = headers.get("Authorization", headers.get("authorization"))if auth_val is not None:headers["Authorization"] = auth_valif "authorization" in headers:try:del headers["authorization"]except Exception:passparams = dict(request.url.params)body_json = Noneif request.content:try:body_json = json.loads((request.content.decode("utf-8")if isinstance(request.content, (bytes, bytearray))else request.content),)except Exception:body_json = Nonekw = {"headers": headers}if params:kw["params"] = paramsif body_json is not None:kw["json"] = body_json_unify_requests._log(method, url_str, True, **kw)except Exception:passdef _post_response_log(response: httpx.Response) -> None:try:request = response.requestif not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)is_stream = Falsetry:req_body = Noneif request.content:try:req_body = json.loads((request.content.decode("utf-8")if isinstance(request.content, (bytes, bytearray))else request.content),)except Exception:req_body = Noneif isinstance(req_body, dict) and req_body.get("stream") is True:is_stream = Trueif "text/event-stream" in (response.headers.get("content-type", "").lower()):is_stream = Trueexcept Exception:passif is_stream:_unify_requests._log(f"{method} response:{response.status_code}",url_str,True,response={},)returntry:response.read()except Exception:passtry:payload = response.json()except Exception:return_unify_requests._log(f"{method} response:{response.status_code}",url_str,response=payload,)except Exception:passreturn httpx.Client(event_hooks={"request": [_pre_request_log], "response": [_post_response_log]},)
2
13
1
74
14
13
130
13
base_url
['auth_val', 'request', 'base_host', 'kw', 'base_scheme', 'method', 'headers', 'is_stream', 'body_json', 'payload', 'params', 'url_str', 'req_body', 'parsed']
Optional[httpx.Client]
{"Assign": 25, "Expr": 4, "If": 13, "Return": 9, "Try": 9}
29
118
29
["_unify_requests_debug_enabled", "urlparse", "request.url.path.endswith", "_is_unify_chat_request", "request.method.upper", "str", "dict", "headers.get", "headers.get", "dict", "json.loads", "isinstance", "request.content.decode", "_unify_requests._log", "_is_unify_chat_request", "request.method.upper", "str", "json.loads", "isinstance", "request.content.decode", "isinstance", "req_body.get", "lower", "response.headers.get", "_unify_requests._log", "response.read", "response.json", "_unify_requests._log", "httpx.Client"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.Unify._get_client"]
The function (make_httpx_client_for_unify_logging) defined within the public class called public.The function start at line 13 and ends at 130. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 29.0 functions, It has 29.0 functions called inside which are ["_unify_requests_debug_enabled", "urlparse", "request.url.path.endswith", "_is_unify_chat_request", "request.method.upper", "str", "dict", "headers.get", "headers.get", "dict", "json.loads", "isinstance", "request.content.decode", "_unify_requests._log", "_is_unify_chat_request", "request.method.upper", "str", "json.loads", "isinstance", "request.content.decode", "isinstance", "req_body.get", "lower", "response.headers.get", "_unify_requests._log", "response.read", "response.json", "_unify_requests._log", "httpx.Client"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.Unify._get_client"].
unifyai_unify
public
public
0
0
make_async_httpx_client_for_unify_logging._is_unify_chat_request
def _is_unify_chat_request(request: httpx.Request) -> bool:try:if request.url.host != base_host or request.url.scheme != base_scheme:return Falsereturn request.url.path.endswith("/chat/completions")except Exception:return False
4
7
1
48
0
145
151
145
null
[]
None
null
0
0
0
null
0
null
The function (make_async_httpx_client_for_unify_logging._is_unify_chat_request) defined within the public class called public.The function start at line 145 and ends at 151. It contains 7 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_async_httpx_client_for_unify_logging._pre_request_log
async def _pre_request_log(request: httpx.Request) -> None:try:if not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)headers = dict(request.headers)auth_val = headers.get("Authorization", headers.get("authorization"))if auth_val is not None:headers["Authorization"] = auth_valif "authorization" in headers:try:del headers["authorization"]except Exception:passparams = dict(request.url.params)body_json = Noneif request.content:try:body_json = json.loads((request.content.decode("utf-8")if isinstance(request.content, (bytes, bytearray))else request.content),)except Exception:body_json = Nonekw = {"headers": headers}if params:kw["params"] = paramsif body_json is not None:kw["json"] = body_json_unify_requests._log(method, url_str, True, **kw)except Exception:pass
11
36
1
195
0
153
191
153
null
[]
None
null
0
0
0
null
0
null
The function (make_async_httpx_client_for_unify_logging._pre_request_log) defined within the public class called public.The function start at line 153 and ends at 191. It contains 36 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_async_httpx_client_for_unify_logging._post_response_log
async def _post_response_log(response: httpx.Response) -> None:try:request = response.requestif not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)is_stream = Falsetry:req_body = Noneif request.content:try:req_body = json.loads((request.content.decode("utf-8")if isinstance(request.content, (bytes, bytearray))else request.content),)except Exception:req_body = Noneif isinstance(req_body, dict) and req_body.get("stream") is True:is_stream = Trueif "text/event-stream" in (response.headers.get("content-type", "").lower()):is_stream = Trueexcept Exception:passif is_stream:_unify_requests._log(f"{method} response:{response.status_code}",url_str,True,response={},)returntry:await response.aread()except Exception:passtry:payload = response.json()except Exception:return_unify_requests._log(f"{method} response:{response.status_code}",url_str,response=payload,)except Exception:pass
13
52
1
210
0
193
247
193
null
[]
None
null
0
0
0
null
0
null
The function (make_async_httpx_client_for_unify_logging._post_response_log) defined within the public class called public.The function start at line 193 and ends at 247. It contains 52 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_async_httpx_client_for_unify_logging
def make_async_httpx_client_for_unify_logging(base_url: str,) -> Optional[httpx.AsyncClient]:if not _unify_requests_debug_enabled():return Nonefrom unify.utils import http as _unify_requestsparsed = urlparse(base_url)base_host = parsed.hostnamebase_scheme = parsed.schemedef _is_unify_chat_request(request: httpx.Request) -> bool:try:if request.url.host != base_host or request.url.scheme != base_scheme:return Falsereturn request.url.path.endswith("/chat/completions")except Exception:return Falseasync def _pre_request_log(request: httpx.Request) -> None:try:if not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)headers = dict(request.headers)auth_val = headers.get("Authorization", headers.get("authorization"))if auth_val is not None:headers["Authorization"] = auth_valif "authorization" in headers:try:del headers["authorization"]except Exception:passparams = dict(request.url.params)body_json = Noneif request.content:try:body_json = json.loads((request.content.decode("utf-8")if isinstance(request.content, (bytes, bytearray))else request.content),)except Exception:body_json = Nonekw = {"headers": headers}if params:kw["params"] = paramsif body_json is not None:kw["json"] = body_json_unify_requests._log(method, url_str, True, **kw)except Exception:passasync def _post_response_log(response: httpx.Response) -> None:try:request = response.requestif not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)is_stream = Falsetry:req_body = Noneif request.content:try:req_body = json.loads((request.content.decode("utf-8")if isinstance(request.content, (bytes, bytearray))else request.content),)except Exception:req_body = Noneif isinstance(req_body, dict) and req_body.get("stream") is True:is_stream = Trueif "text/event-stream" in (response.headers.get("content-type", "").lower()):is_stream = Trueexcept Exception:passif is_stream:_unify_requests._log(f"{method} response:{response.status_code}",url_str,True,response={},)returntry:await response.aread()except Exception:passtry:payload = response.json()except Exception:return_unify_requests._log(f"{method} response:{response.status_code}",url_str,response=payload,)except Exception:passreturn httpx.AsyncClient(event_hooks={"request": [_pre_request_log], "response": [_post_response_log]},)
2
15
1
77
14
133
251
133
base_url
['auth_val', 'request', 'base_host', 'kw', 'base_scheme', 'method', 'headers', 'is_stream', 'body_json', 'payload', 'params', 'url_str', 'req_body', 'parsed']
Optional[httpx.AsyncClient]
{"Assign": 25, "Expr": 4, "If": 13, "Return": 9, "Try": 9}
29
119
29
["_unify_requests_debug_enabled", "urlparse", "request.url.path.endswith", "_is_unify_chat_request", "request.method.upper", "str", "dict", "headers.get", "headers.get", "dict", "json.loads", "isinstance", "request.content.decode", "_unify_requests._log", "_is_unify_chat_request", "request.method.upper", "str", "json.loads", "isinstance", "request.content.decode", "isinstance", "req_body.get", "lower", "response.headers.get", "_unify_requests._log", "response.aread", "response.json", "_unify_requests._log", "httpx.AsyncClient"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.AsyncUnify._get_client"]
The function (make_async_httpx_client_for_unify_logging) defined within the public class called public.The function start at line 133 and ends at 251. It contains 15 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 29.0 functions, It has 29.0 functions called inside which are ["_unify_requests_debug_enabled", "urlparse", "request.url.path.endswith", "_is_unify_chat_request", "request.method.upper", "str", "dict", "headers.get", "headers.get", "dict", "json.loads", "isinstance", "request.content.decode", "_unify_requests._log", "_is_unify_chat_request", "request.method.upper", "str", "json.loads", "isinstance", "request.content.decode", "isinstance", "req_body.get", "lower", "response.headers.get", "_unify_requests._log", "response.aread", "response.json", "_unify_requests._log", "httpx.AsyncClient"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.AsyncUnify._get_client"].
unifyai_unify
public
public
0
0
get_query_tags
def get_query_tags(*,api_key: Optional[str] = None,) -> List[str]:"""Get a list of available query tags.Args:api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A list of available query tags if successful, otherwise an empty list."""headers = _create_request_header(api_key)url = f"{BASE_URL}/tags"response = http.get(url, headers=headers)if response.status_code != 200:raise Exception(response.json())return response.json()
2
10
1
65
3
10
30
10
api_key
['headers', 'url', 'response']
List[str]
{"Assign": 3, "Expr": 1, "If": 1, "Return": 1}
5
21
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (get_query_tags) defined within the public class called public.The function start at line 10 and ends at 30. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.get", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
get_queries
def get_queries(*,tags: Optional[Union[str, List[str]]] = None,endpoints: Optional[Union[str, List[str]]] = None,start_time: Optional[Union[datetime.datetime, str]] = None,end_time: Optional[Union[datetime.datetime, str]] = None,page_number: Optional[int] = None,failures: Optional[Union[bool, str]] = None,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Get query history based on specified filters.Args:tags: Tags to filter for queries that are marked with these tags.endpoints: Optionally specify an endpoint, or a list of endpoints to filter for.start_time: Timestamp of the earliest query to aggregate.Format is `YYYY-MM-DD hh:mm:ss`.end_time: Timestamp of the latest query to aggregate.Format is `YYYY-MM-DD hh:mm:ss`.page_number: The query history is returned in pages, with up to 100 prompts perpage. Increase the page number to see older prompts. Default is 1.failures: indicates whether to includes failures in the return(when set as True), or whether to return failures exclusively(when set as β€˜only’). Default is False.api_key: If specified, unify API key to be used.Defaults to the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the query history data."""headers = _create_request_header(api_key)params = {}if tags:params["tags"] = tagsif endpoints:params["endpoints"] = endpointsif start_time:params["start_time"] = start_timeif end_time:params["end_time"] = end_timeif page_number:params["page_number"] = page_numberif failures:params["failures"] = failuresurl = f"{BASE_URL}/queries"response = http.get(url, headers=headers, params=params)if response.status_code != 200:raise Exception(response.json())return response.json()
8
29
7
218
4
33
91
33
tags,endpoints,start_time,end_time,page_number,failures,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 10, "Expr": 1, "If": 7, "Return": 1}
5
59
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (get_queries) defined within the public class called public.The function start at line 33 and ends at 91. It contains 29 lines of code and it has a cyclomatic complexity of 8. It takes 7 parameters, represented as [33.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["_create_request_header", "http.get", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
log_query
def log_query(*,endpoint: str,query_body: Dict,response_body: Optional[Dict] = None,tags: Optional[List[str]] = None,timestamp: Optional[Union[datetime.datetime, str]] = None,api_key: Optional[str] = None,consume_credits: bool = False,):"""Log a query (and optionally response) for a locally deployed (non-Unify-registered)model, with tagging (default None) and timestamp (default datetime.now() alsooptionally writeable.Args:endpoint: Endpoint to log query for.query_body: A dict containing the body of the request.response_body: An optional dict containing the response to the request.tags: Custom tags for later filtering.timestamp: A timestamp (if not set, will be the time of sending).api_key: If specified, unify API key to be used. Defaults to the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response message if successful.Raises:requests.HTTPError: If the API request fails."""headers = _create_request_header(api_key)data = {"endpoint": endpoint,"query_body": query_body,"response_body": response_body,"tags": tags,"timestamp": timestamp,"consume_credits": consume_credits,}# Remove None values from paramsdata = {k: v for k, v in data.items() if v is not None}url = f"{BASE_URL}/queries"response = http.post(url, headers=headers, json=data)if response.status_code != 200:raise Exception(response.json())return response.json()
4
25
7
165
4
94
143
94
endpoint,query_body,response_body,tags,timestamp,api_key,consume_credits
['headers', 'url', 'data', 'response']
Returns
{"Assign": 5, "Expr": 1, "If": 1, "Return": 1}
6
50
6
["_create_request_header", "data.items", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (log_query) defined within the public class called public.The function start at line 94 and ends at 143. It contains 25 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [94.0], and this function return a value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["_create_request_header", "data.items", "http.post", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
get_query_metrics
def get_query_metrics(*,start_time: Optional[Union[datetime.datetime, str]] = None,end_time: Optional[Union[datetime.datetime, str]] = None,models: Optional[str] = None,providers: Optional[str] = None,interval: int = 300,secondary_user_id: Optional[str] = None,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Get query metrics for specified parameters.Args:start_time: Timestamp of the earliest query to aggregate. Format is `YYYY-MM-DD hh:mm:ss`.end_time: Timestamp of the latest query to aggregate. Format is `YYYY-MM-DD hh:mm:ss`.models: Models to fetch metrics from. Comma-separated string of model names.providers: Providers to fetch metrics from. Comma-separated string of provider names.interval: Number of seconds in the aggregation interval. Default is 300.secondary_user_id: Secondary user id to match the `user` attribute from `/chat/completions`.api_key: If specified, unify API key to be used. Defaults to the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the query metrics."""headers = _create_request_header(api_key)params = {"start_time": start_time,"end_time": end_time,"models": models,"providers": providers,"interval": interval,"secondary_user_id": secondary_user_id,}# Remove None values from paramsparams = {k: v for k, v in params.items() if v is not None}url = f"{BASE_URL}/metrics"response = http.get(url, headers=headers, params=params)if response.status_code != 200:raise Exception(response.json())return response.json()
4
25
7
186
4
146
191
146
start_time,end_time,models,providers,interval,secondary_user_id,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 5, "Expr": 1, "If": 1, "Return": 1}
6
46
6
["_create_request_header", "params.items", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (get_query_metrics) defined within the public class called public.The function start at line 146 and ends at 191. It contains 25 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [146.0] and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["_create_request_header", "params.items", "http.get", "Exception", "response.json", "response.json"].
unifyai_unify
public
public
0
0
list_providers
def list_providers(model: Optional[str] = None,*,api_key: Optional[str] = None,) -> List[str]:"""Get a list of available providers, either in total or for a specific model.Args:model: If specified, returns the list of providers supporting this model.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A list of provider names associated with the model if successful, otherwise anempty list.Raises:BadRequestError: If there was an HTTP error.ValueError: If there was an error parsing the JSON response."""headers = _create_request_header(api_key)url = f"{BASE_URL}/providers"if model:kw = dict(headers=headers, params={"model": model})else:kw = dict(headers=headers)response = http.get(url, **kw)if response.status_code != 200:raise Exception(response.json())return _res_to_list(response)
3
15
2
101
4
11
40
11
model,api_key
['headers', 'url', 'kw', 'response']
List[str]
{"Assign": 5, "Expr": 1, "If": 2, "Return": 1}
8
30
8
["_create_request_header", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"]
0
[]
The function (list_providers) defined within the public class called public.The function start at line 11 and ends at 40. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [11.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["_create_request_header", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"].
unifyai_unify
public
public
0
0
list_models
def list_models(provider: Optional[str] = None,*,api_key: Optional[str] = None,) -> List[str]:"""Get a list of available models, either in total or for a specific provider.Args:provider: If specified, returns the list of models supporting this provider.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A list of available model names if successful, otherwise an empty list.Raises:BadRequestError: If there was an HTTP error.ValueError: If there was an error parsing the JSON response."""headers = _create_request_header(api_key)url = f"{BASE_URL}/models"if provider:kw = dict(headers=headers, params={"provider": provider})else:kw = dict(headers=headers)response = http.get(url, **kw)if response.status_code != 200:raise Exception(response.json())return _res_to_list(response)
3
15
2
101
4
44
72
44
provider,api_key
['headers', 'url', 'kw', 'response']
List[str]
{"Assign": 5, "Expr": 1, "If": 2, "Return": 1}
8
29
8
["_create_request_header", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.__init__"]
The function (list_models) defined within the public class called public.The function start at line 44 and ends at 72. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [44.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions called inside which are ["_create_request_header", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.__init__"].
unifyai_unify
public
public
0
0
list_endpoints
def list_endpoints(model: Optional[str] = None,provider: Optional[str] = None,*,api_key: Optional[str] = None,) -> List[str]:"""Get a list of available endpoint, either in total or for a specific model orprovider.Args:model: If specified, returns the list of endpoint supporting this model.provider: If specified, returns the list of endpoint supporting this provider.api_key: If specified, unify API key to be used. Defaults to the value in the`UNIFY_KEY` environment variable.Returns:A list of endpoint names if successful, otherwise an empty list.Raises:BadRequestError: If there was an HTTP error.ValueError: If there was an error parsing the JSON response."""headers = _create_request_header(api_key)url = f"{BASE_URL}/endpoints"if model and provider:raise ValueError("Please specify either model OR provider, not both.")elif model:kw = dict(headers=headers, params={"model": model})return _res_to_list(http.get(url, headers=headers, params={"model": model}),)elif provider:kw = dict(headers=headers, params={"provider": provider})else:kw = dict(headers=headers)response = http.get(url, **kw)if response.status_code != 200:raise Exception(response.json())return _res_to_list(response)
6
23
3
162
4
76
115
76
model,provider,api_key
['headers', 'url', 'kw', 'response']
List[str]
{"Assign": 6, "Expr": 1, "If": 4, "Return": 2}
12
40
12
["_create_request_header", "ValueError", "dict", "_res_to_list", "http.get", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"]
0
[]
The function (list_endpoints) defined within the public class called public.The function start at line 76 and ends at 115. It contains 23 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [76.0] and does not return any value. It declares 12.0 functions, and It has 12.0 functions called inside which are ["_create_request_header", "ValueError", "dict", "_res_to_list", "http.get", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"].
unifyai_unify
public
public
0
0
get_user_basic_info
def get_user_basic_info(*, api_key: Optional[str] = None):"""Get basic information for the authenticated user.Args:api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:The basic information for the authenticated user."""headers = _create_request_header(api_key)response = http.get(f"{BASE_URL}/user/basic-info", headers=headers)return response.json()
1
4
1
40
2
8
21
8
api_key
['headers', 'response']
Returns
{"Assign": 2, "Expr": 1, "Return": 1}
3
14
3
["_create_request_header", "http.get", "response.json"]
0
[]
The function (get_user_basic_info) defined within the public class called public.The function start at line 8 and ends at 21. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 functions called inside which are ["_create_request_header", "http.get", "response.json"].
unifyai_unify
public
public
0
0
set_cache_backend
def set_cache_backend(backend: str) -> None:"""Set the current cache backend."""global CURRENT_CACHE_BACKENDif backend not in CACHE_BACKENDS:raise ValueError(f"Invalid backend: {backend}. Available: {list(CACHE_BACKENDS.keys())}",)CURRENT_CACHE_BACKEND = backend
2
7
1
28
1
32
39
32
backend
['CURRENT_CACHE_BACKEND']
None
{"Assign": 1, "Expr": 1, "If": 1}
3
8
3
["ValueError", "list", "CACHE_BACKENDS.keys"]
0
[]
The function (set_cache_backend) defined within the public class called public.The function start at line 32 and ends at 39. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called inside which are ["ValueError", "list", "CACHE_BACKENDS.keys"].
unifyai_unify
public
public
0
0
get_cache_backend
def get_cache_backend(backend: Optional[str] = None) -> Type[BaseCache]:"""Get the cache backend class."""if backend is None:backend = CURRENT_CACHE_BACKENDif backend not in CACHE_BACKENDS:raise ValueError(f"Invalid backend: {backend}. Available: {list(CACHE_BACKENDS.keys())}",)return CACHE_BACKENDS[backend]
3
8
1
44
1
42
50
42
backend
['backend']
Type[BaseCache]
{"Assign": 1, "Expr": 1, "If": 2, "Return": 1}
3
9
3
["ValueError", "list", "CACHE_BACKENDS.keys"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928978_ui_django_post_office.post_office.tests.test_cache_py.CacheTest.test_get_backend_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._write_to_cache"]
The function (get_cache_backend) defined within the public class called public.The function start at line 42 and ends at 50. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions called inside which are ["ValueError", "list", "CACHE_BACKENDS.keys"], It has 3.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928978_ui_django_post_office.post_office.tests.test_cache_py.CacheTest.test_get_backend_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._write_to_cache"].
unifyai_unify
public
public
0
0
set_caching
def set_caching(value: bool) -> bool:"""Enable or disable caching globally."""global CACHING_ENABLEDCACHING_ENABLED = valuereturn CACHING_ENABLED
1
4
1
17
1
53
57
53
value
['CACHING_ENABLED']
bool
{"Assign": 1, "Expr": 1, "Return": 1}
0
5
0
[]
0
[]
The function (set_caching) defined within the public class called public.The function start at line 53 and ends at 57. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
is_caching_enabled
def is_caching_enabled() -> bool:"""Check if caching is globally enabled."""return CACHING_ENABLED
1
2
0
9
0
60
62
60
[]
bool
{"Expr": 1, "Return": 1}
0
3
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.generate"]
The function (is_caching_enabled) defined within the public class called public.The function start at line 60 and ends at 62. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 2.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.generate"].
unifyai_unify
public
public
0
0
_minimal_char_diff
def _minimal_char_diff(a: str, b: str, context: int = 5) -> str:matcher = difflib.SequenceMatcher(None, a, b)diff_parts = []for tag, i1, i2, j1, j2 in matcher.get_opcodes():if tag == "equal":segment = a[i1:i2]# If the segment is too long, show only a context at the beginning and end.if len(segment) > 2 * context:diff_parts.append(segment[:context] + "..." + segment[-context:])else:diff_parts.append(segment)elif tag == "replace":diff_parts.append(f"[{a[i1:i2]}|{b[j1:j2]}]")elif tag == "delete":diff_parts.append(f"[-{a[i1:i2]}-]")elif tag == "insert":diff_parts.append(f"[+{b[j1:j2]}+]")return "".join(diff_parts)
7
17
3
145
3
65
84
65
a,b,context
['diff_parts', 'segment', 'matcher']
str
{"Assign": 3, "Expr": 5, "For": 1, "If": 5, "Return": 1}
9
20
9
["difflib.SequenceMatcher", "matcher.get_opcodes", "len", "diff_parts.append", "diff_parts.append", "diff_parts.append", "diff_parts.append", "diff_parts.append", "join"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache"]
The function (_minimal_char_diff) defined within the public class called public.The function start at line 65 and ends at 84. It contains 17 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [65.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions called inside which are ["difflib.SequenceMatcher", "matcher.get_opcodes", "len", "diff_parts.append", "diff_parts.append", "diff_parts.append", "diff_parts.append", "diff_parts.append", "join"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache"].
unifyai_unify
public
public
0
0
_get_cache
def _get_cache(fn_name: str,kw: Dict[str, Any],filename: str = None,raise_on_empty: bool = False,read_closest: bool = False,delete_closest: bool = False,backend: Optional[str] = None,) -> Optional[Any]:global CACHE_LOCK# Prevents circular importfrom unify.logging.logs import Logtype_mapping = {"ChatCompletion": ChatCompletion,"Log": Log,"ParsedChatCompletion": ParsedChatCompletion,}CACHE_LOCK.acquire()try:current_backend = get_cache_backend(backend)current_backend.initialize_cache(filename)kw = {k: v for k, v in kw.items() if v is not None}kw_str = BaseCache.serialize_object(kw)cache_str = f"{fn_name}_{kw_str}"if not current_backend.has_key(cache_str):if raise_on_empty or read_closest:keys_to_search = current_backend.list_keys()if len(keys_to_search) == 0:CACHE_LOCK.release()raise Exception(f"Failed to get cache for function {fn_name} with kwargs {BaseCache.serialize_object(kw, indent=4)} "f"Cache is empty, mode is read-only ",)closest_match = difflib.get_close_matches(cache_str,keys_to_search,n=1,cutoff=0,)[0]minimal_char_diff = _minimal_char_diff(cache_str, closest_match)if read_closest:cache_str = closest_matchelse:CACHE_LOCK.release()raise Exception(f"Failed to get cache for function {fn_name} with kwargs {BaseCache.serialize_object(kw, indent=4)} "f"from cache at {filename}. \n\nCorresponding key\n{cache_str}\nwas not found in the cache.\n\n"f"The closest match is:\n{closest_match}\n\n"f"The contracted diff is:\n{minimal_char_diff}\n\n",)else:CACHE_LOCK.release()returnret, res_types = current_backend.retrieve_entry(cache_str)if res_types is None:CACHE_LOCK.release()return retfor idx_str, type_str in res_types.items():type_str = type_str.split("[")[0]idx_list = json.loads(idx_str)if len(idx_list) == 0:if read_closest and delete_closest:current_backend.remove_entry(cache_str)CACHE_LOCK.release()typ = type_mapping[type_str]if issubclass(typ, BaseModel):return typ(**ret)elif issubclass(typ, Log):return typ.from_json(ret)raise Exception(f"Cache indexing found for unsupported type: {typ}")item = retfor i, idx in enumerate(idx_list):if i == len(idx_list) - 1:typ = type_mapping[type_str]if issubclass(typ, BaseModel) or issubclass(typ, Log):item[idx] = typ.from_json(item[idx])else:raise Exception(f"Cache indexing found for unsupported type: {typ}",)breakitem = item[idx]if read_closest and delete_closest:current_backend.remove_entry(cache_str)CACHE_LOCK.release()return retexcept Exception as e:if CACHE_LOCK.locked():CACHE_LOCK.release()raise Exception(f"Failed to get cache for function {fn_name} with kwargs {kw} "f"from cache at {filename}",) from e
23
92
7
478
12
88
181
88
fn_name,kw,filename,raise_on_empty,read_closest,delete_closest,backend
['minimal_char_diff', 'current_backend', 'idx_list', 'cache_str', 'typ', 'kw_str', 'kw', 'item', 'type_str', 'type_mapping', 'closest_match', 'keys_to_search']
Optional[Any]
{"Assign": 17, "Expr": 11, "For": 2, "If": 13, "Return": 5, "Try": 1}
41
94
41
["CACHE_LOCK.acquire", "get_cache_backend", "current_backend.initialize_cache", "kw.items", "BaseCache.serialize_object", "current_backend.has_key", "current_backend.list_keys", "len", "CACHE_LOCK.release", "Exception", "BaseCache.serialize_object", "difflib.get_close_matches", "_minimal_char_diff", "CACHE_LOCK.release", "Exception", "BaseCache.serialize_object", "CACHE_LOCK.release", "current_backend.retrieve_entry", "CACHE_LOCK.release", "res_types.items", "type_str.split", "json.loads", "len", "current_backend.remove_entry", "CACHE_LOCK.release", "issubclass", "typ", "issubclass", "typ.from_json", "Exception", "enumerate", "len", "issubclass", "issubclass", "typ.from_json", "Exception", "current_backend.remove_entry", "CACHE_LOCK.release", "CACHE_LOCK.locked", "CACHE_LOCK.release", "Exception"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_utils.test_map_py.test_map_w_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.AsyncUnify._generate_non_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.Unify._generate_non_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._handle_reading_from_cache"]
The function (_get_cache) defined within the public class called public.The function start at line 88 and ends at 181. It contains 92 lines of code and it has a cyclomatic complexity of 23. It takes 7 parameters, represented as [88.0] and does not return any value. It declares 41.0 functions, It has 41.0 functions called inside which are ["CACHE_LOCK.acquire", "get_cache_backend", "current_backend.initialize_cache", "kw.items", "BaseCache.serialize_object", "current_backend.has_key", "current_backend.list_keys", "len", "CACHE_LOCK.release", "Exception", "BaseCache.serialize_object", "difflib.get_close_matches", "_minimal_char_diff", "CACHE_LOCK.release", "Exception", "BaseCache.serialize_object", "CACHE_LOCK.release", "current_backend.retrieve_entry", "CACHE_LOCK.release", "res_types.items", "type_str.split", "json.loads", "len", "current_backend.remove_entry", "CACHE_LOCK.release", "issubclass", "typ", "issubclass", "typ.from_json", "Exception", "enumerate", "len", "issubclass", "issubclass", "typ.from_json", "Exception", "current_backend.remove_entry", "CACHE_LOCK.release", "CACHE_LOCK.locked", "CACHE_LOCK.release", "Exception"], It has 5.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_utils.test_map_py.test_map_w_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.AsyncUnify._generate_non_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.Unify._generate_non_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._handle_reading_from_cache"].
unifyai_unify
public
public
0
0
_write_to_cache
def _write_to_cache(fn_name: str,kw: Dict[str, Any],response: Any,backend: Optional[str] = None,filename: str = None,):global CACHE_LOCKCACHE_LOCK.acquire()try:current_backend = get_cache_backend(backend)current_backend.initialize_cache(filename)kw = {k: v for k, v in kw.items() if v is not None}kw_str = BaseCache.serialize_object(kw)cache_str = f"{fn_name}_{kw_str}"res_types = {}response_str = BaseCache.serialize_object(response, res_types)current_backend.store_entry(key=cache_str,value=response_str,res_types=res_types if len(res_types) > 0 else None,)CACHE_LOCK.release()except Exception as e:CACHE_LOCK.release()raise Exception(f"Failed to write function {fn_name} with kwargs {kw} and "f"response {response} to cache at {filename}",) from e
5
29
5
157
6
185
214
185
fn_name,kw,response,backend,filename
['res_types', 'current_backend', 'cache_str', 'kw', 'kw_str', 'response_str']
None
{"Assign": 6, "Expr": 5, "Try": 1}
11
30
11
["CACHE_LOCK.acquire", "get_cache_backend", "current_backend.initialize_cache", "kw.items", "BaseCache.serialize_object", "BaseCache.serialize_object", "current_backend.store_entry", "len", "CACHE_LOCK.release", "CACHE_LOCK.release", "Exception"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_utils.test_map_py.test_map_w_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.AsyncUnify._generate_non_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.Unify._generate_non_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py.cached"]
The function (_write_to_cache) defined within the public class called public.The function start at line 185 and ends at 214. It contains 29 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [185.0] and does not return any value. It declares 11.0 functions, It has 11.0 functions called inside which are ["CACHE_LOCK.acquire", "get_cache_backend", "current_backend.initialize_cache", "kw.items", "BaseCache.serialize_object", "BaseCache.serialize_object", "current_backend.store_entry", "len", "CACHE_LOCK.release", "CACHE_LOCK.release", "Exception"], It has 5.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_utils.test_map_py.test_map_w_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.AsyncUnify._generate_non_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.Unify._generate_non_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py.cached"].
unifyai_unify
public
public
0
0
_handle_reading_from_cache
def _handle_reading_from_cache(fn_name: str,kwargs: Dict[str, Any],mode: str,backend: Optional[str] = None,):if isinstance(mode, str) and mode.endswith("-closest"):mode = mode.removesuffix("-closest")read_closest = Trueelse:read_closest = Falsein_cache = Falseret = Noneif mode in [True, "both", "read", "read-only"]:ret = _get_cache(fn_name=fn_name,kw=kwargs,raise_on_empty=mode == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=backend,)in_cache = True if ret is not None else Falsereturn ret, read_closest, in_cache
5
24
4
127
4
217
240
217
fn_name,kwargs,mode,backend
['ret', 'mode', 'read_closest', 'in_cache']
Returns
{"Assign": 7, "If": 2, "Return": 1}
4
24
4
["isinstance", "mode.endswith", "mode.removesuffix", "_get_cache"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py.cached"]
The function (_handle_reading_from_cache) defined within the public class called public.The function start at line 217 and ends at 240. It contains 24 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [217.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions called inside which are ["isinstance", "mode.endswith", "mode.removesuffix", "_get_cache"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py.cached"].
unifyai_unify
public
public
0
0
cached.wrapped
def wrapped(*args, **kwargs):sig = inspect.signature(fn)bound = sig.bind_partial(*args, **kwargs)args_kwargs = bound.argumentsret, read_closest, in_cache = _handle_reading_from_cache(fn.__name__,args_kwargs,mode,backend,)if ret is None:ret = fn(*args, **kwargs)if (ret is not None or read_closest) and mode in [True,"both","write",]:if not in_cache or mode == "write":_write_to_cache(fn_name=fn.__name__,kw=args_kwargs,response=ret,backend=backend,)return ret
7
25
2
120
0
260
284
260
null
[]
None
null
0
0
0
null
0
null
The function (cached.wrapped) defined within the public class called public.The function start at line 260 and ends at 284. It contains 25 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [260.0] and does not return any value..
unifyai_unify
public
public
0
0
cached.async_wrapped
async def async_wrapped(*args, **kwargs):sig = inspect.signature(fn)bound = sig.bind_partial(*args, **kwargs)args_kwargs = bound.argumentsret, read_closest, in_cache = _handle_reading_from_cache(fn.__name__,args_kwargs,mode,backend,)if ret is None:ret = await fn(*args, **kwargs)if (ret is not None or read_closest) and mode in [True,"both","write",]:if not in_cache or mode == "write":_write_to_cache(fn_name=fn.__name__,kw=args_kwargs,response=ret,backend=backend,)return ret
7
25
2
121
0
286
310
286
null
[]
None
null
0
0
0
null
0
null
The function (cached.async_wrapped) defined within the public class called public.The function start at line 286 and ends at 310. It contains 25 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [286.0] and does not return any value..
unifyai_unify
public
public
0
0
cached
def cached(fn: callable = None,*,mode: Union[bool, str] = True,backend: Optional[str] = None,):if fn is None:return lambda f: cached(f,mode=mode,backend=backend,)def wrapped(*args, **kwargs):sig = inspect.signature(fn)bound = sig.bind_partial(*args, **kwargs)args_kwargs = bound.argumentsret, read_closest, in_cache = _handle_reading_from_cache(fn.__name__,args_kwargs,mode,backend,)if ret is None:ret = fn(*args, **kwargs)if (ret is not None or read_closest) and mode in [True,"both","write",]:if not in_cache or mode == "write":_write_to_cache(fn_name=fn.__name__,kw=args_kwargs,response=ret,backend=backend,)return retasync def async_wrapped(*args, **kwargs):sig = inspect.signature(fn)bound = sig.bind_partial(*args, **kwargs)args_kwargs = bound.argumentsret, read_closest, in_cache = _handle_reading_from_cache(fn.__name__,args_kwargs,mode,backend,)if ret is None:ret = await fn(*args, **kwargs)if (ret is not None or read_closest) and mode in [True,"both","write",]:if not in_cache or mode == "write":_write_to_cache(fn_name=fn.__name__,kw=args_kwargs,response=ret,backend=backend,)return retreturn wrapped if not inspect.iscoroutinefunction(fn) else async_wrapped
3
15
3
71
4
247
312
247
fn,mode,backend
['sig', 'bound', 'ret', 'args_kwargs']
Returns
{"Assign": 10, "Expr": 2, "If": 7, "Return": 4}
12
66
12
["cached", "inspect.signature", "sig.bind_partial", "_handle_reading_from_cache", "fn", "_write_to_cache", "inspect.signature", "sig.bind_partial", "_handle_reading_from_cache", "fn", "_write_to_cache", "inspect.iscoroutinefunction"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_cacheutils_py.test_cached_dec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_cacheutils_py.test_callable_cached_dec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_cacheutils_py.test_unscoped_cached_dec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3969493_cheran_senthil_tle.tle.util.cache_system2_py.CacheSystem.getUsersEffectiveRating", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69724044_opendatacube_odc_geo.odc.geo.cog._s3_py.S3MultiPartUpload.s3_client", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py.cached"]
The function (cached) defined within the public class called public.The function start at line 247 and ends at 312. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [247.0], and this function return a value. It declares 12.0 functions, It has 12.0 functions called inside which are ["cached", "inspect.signature", "sig.bind_partial", "_handle_reading_from_cache", "fn", "_write_to_cache", "inspect.signature", "sig.bind_partial", "_handle_reading_from_cache", "fn", "_write_to_cache", "inspect.iscoroutinefunction"], It has 6.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_cacheutils_py.test_cached_dec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_cacheutils_py.test_callable_cached_dec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_cacheutils_py.test_unscoped_cached_dec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3969493_cheran_senthil_tle.tle.util.cache_system2_py.CacheSystem.getUsersEffectiveRating", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69724044_opendatacube_odc_geo.odc.geo.cog._s3_py.S3MultiPartUpload.s3_client", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py.cached"].
unifyai_unify
public
public
0
0
cache_file_union
def cache_file_union(first_cache_fpath: str,second_cache_fpath: str,target_cache_fpath: str,conflict_mode="raise",):with open(first_cache_fpath, "r") as file:first_cache = json.load(file)with open(second_cache_fpath, "r") as file:second_cache = json.load(file)if conflict_mode == "raise":for key, value in first_cache.items():if key in second_cache:assert second_cache[key] == value, (f"key {key} found in both caches, but values conflict:"f"{first_cache_fpath} had value: {value}"f"{second_cache_fpath} had value: {second_cache[key]}")union_cache = {**first_cache, **second_cache}elif conflict_mode == "first_overrides":union_cache = {**second_cache, **first_cache}elif conflict_mode == "second_overrides":union_cache = {**first_cache, **second_cache}else:raise Exception("Invalud conflict_mode, must be one of: 'raise', 'first_overrides' or 'second_overrides'",)with open(target_cache_fpath, "w+") as file:json.dump(union_cache, file)
6
29
4
156
3
319
347
319
first_cache_fpath,second_cache_fpath,target_cache_fpath,conflict_mode
['second_cache', 'first_cache', 'union_cache']
None
{"Assign": 5, "Expr": 1, "For": 1, "If": 4, "With": 3}
8
29
8
["open", "json.load", "open", "json.load", "first_cache.items", "Exception", "open", "json.dump"]
0
[]
The function (cache_file_union) defined within the public class called public.The function start at line 319 and ends at 347. It contains 29 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [319.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["open", "json.load", "open", "json.load", "first_cache.items", "Exception", "open", "json.dump"].
unifyai_unify
public
public
0
0
cache_file_intersection
def cache_file_intersection(first_cache_fpath: str,second_cache_fpath: str,target_cache_fpath: str,conflict_mode="raise",):with open(first_cache_fpath, "r") as file:first_cache = json.load(file)with open(second_cache_fpath, "r") as file:second_cache = json.load(file)if conflict_mode == "raise":for key, value in first_cache.items():if key in second_cache:assert second_cache[key] == value, (f"key {key} found in both caches, but values conflict:"f"{first_cache_fpath} had value: {value}"f"{second_cache_fpath} had value: {second_cache[key]}")intersection_cache = {k: v for k, v in first_cache.items() if k in second_cache}elif conflict_mode == "first_overrides":intersection_cache = {k: v for k, v in first_cache.items() if k in second_cache}elif conflict_mode == "second_overrides":intersection_cache = {k: v for k, v in second_cache.items() if k in first_cache}else:raise Exception("Invalud conflict_mode, must be one of: 'raise', 'first_overrides' or 'second_overrides'",)with open(target_cache_fpath, "w+") as file:json.dump(intersection_cache, file)
12
29
4
192
3
350
378
350
first_cache_fpath,second_cache_fpath,target_cache_fpath,conflict_mode
['intersection_cache', 'second_cache', 'first_cache']
None
{"Assign": 5, "Expr": 1, "For": 1, "If": 4, "With": 3}
11
29
11
["open", "json.load", "open", "json.load", "first_cache.items", "first_cache.items", "first_cache.items", "second_cache.items", "Exception", "open", "json.dump"]
0
[]
The function (cache_file_intersection) defined within the public class called public.The function start at line 350 and ends at 378. It contains 29 lines of code and it has a cyclomatic complexity of 12. It takes 4 parameters, represented as [350.0] and does not return any value. It declares 11.0 functions, and It has 11.0 functions called inside which are ["open", "json.load", "open", "json.load", "first_cache.items", "first_cache.items", "first_cache.items", "second_cache.items", "Exception", "open", "json.dump"].
unifyai_unify
public
public
0
0
subtract_cache_files
def subtract_cache_files(first_cache_fpath: str,second_cache_fpath: str,target_cache_fpath: str,raise_on_conflict=True,):with open(first_cache_fpath, "r") as file:first_cache = json.load(file)with open(second_cache_fpath, "r") as file:second_cache = json.load(file)if raise_on_conflict:for key, value in first_cache.items():if key in second_cache:assert second_cache[key] == value, (f"key {key} found in both caches, but values conflict:"f"{first_cache_fpath} had value: {value}"f"{second_cache_fpath} had value: {second_cache[key]}")final_cache = {k: v for k, v in first_cache.items() if k not in second_cache}with open(target_cache_fpath, "w+") as file:json.dump(final_cache, file)
6
21
4
131
3
381
401
381
first_cache_fpath,second_cache_fpath,target_cache_fpath,raise_on_conflict
['second_cache', 'first_cache', 'final_cache']
None
{"Assign": 3, "Expr": 1, "For": 1, "If": 2, "With": 3}
8
21
8
["open", "json.load", "open", "json.load", "first_cache.items", "first_cache.items", "open", "json.dump"]
0
[]
The function (subtract_cache_files) defined within the public class called public.The function start at line 381 and ends at 401. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [381.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["open", "json.load", "open", "json.load", "first_cache.items", "first_cache.items", "open", "json.dump"].
unifyai_unify
public
public
0
0
_res_to_list
def _res_to_list(response: requests.Response) -> Union[List, Dict]:return json.loads(response.text)
1
2
1
25
0
15
16
15
response
[]
Union[List, Dict]
{"Return": 1}
1
2
1
["json.loads"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.credits_py.get_credits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.supported_endpoints_py.list_endpoints", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.supported_endpoints_py.list_models", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.supported_endpoints_py.list_providers"]
The function (_res_to_list) defined within the public class called public.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which is ["json.loads"], It has 4.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.credits_py.get_credits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.supported_endpoints_py.list_endpoints", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.supported_endpoints_py.list_models", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.supported_endpoints_py.list_providers"].
unifyai_unify
public
public
0
0
_validate_api_key
def _validate_api_key(api_key: Optional[str]) -> str:if api_key is None:api_key = os.environ.get("UNIFY_KEY")if api_key is None:raise KeyError("UNIFY_KEY is missing. Please make sure it is set correctly!",)return api_key
3
8
1
40
1
19
26
19
api_key
['api_key']
str
{"Assign": 1, "If": 2, "Return": 1}
2
8
2
["os.environ.get", "KeyError"]
38
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.dataset_py.Dataset.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Log.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.add_dataset_entries", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.delete_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.download_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.upload_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._AsyncTraceLogger.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._add_to_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_derived_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_log_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_groups", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_log_by_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_logs_latest_timestamp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_logs_metric", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.initialize_async_logger", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.join_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.rename_field", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.update_derived_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.projects_py.commit_project"]
The function (_validate_api_key) defined within the public class called public.The function start at line 19 and ends at 26. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["os.environ.get", "KeyError"], It has 38.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.dataset_py.Dataset.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Log.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.add_dataset_entries", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.delete_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.download_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.upload_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._AsyncTraceLogger.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._add_to_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_derived_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_log_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_groups", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_log_by_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_logs_latest_timestamp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_logs_metric", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.initialize_async_logger", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.join_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.rename_field", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.update_derived_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.projects_py.commit_project"].
unifyai_unify
public
public
0
0
_create_request_header
def _create_request_header(api_key: Optional[str]) -> Dict[str, str]:return {"Authorization": f"Bearer {_validate_api_key(api_key)}","accept": "application/json","Content-Type": "application/json",}
1
6
1
33
0
29
34
29
api_key
[]
Dict[str, str]
{"Return": 1}
1
6
1
["_validate_api_key"]
63
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.create_assistant", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.delete_assistant", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.list_assistants", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.update_assistant", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.async_logger_py.AsyncLoggerManager.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.add_logs_to_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.commit_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.create_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.create_contexts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.delete_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_context_commits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_contexts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.rename_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.rollback_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._AsyncTraceLogger.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._add_to_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._sync_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_derived_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_log_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_fields"]
The function (_create_request_header) defined within the public class called public.The function start at line 29 and ends at 34. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which is ["_validate_api_key"], It has 63.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.create_assistant", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.delete_assistant", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.list_assistants", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.update_assistant", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.async_logger_py.AsyncLoggerManager.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.add_logs_to_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.commit_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.create_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.create_contexts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.delete_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_context_commits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_contexts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.rename_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.rollback_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._AsyncTraceLogger.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._add_to_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._sync_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_derived_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_log_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_fields"].
unifyai_unify
public
public
0
0
_validate_openai_api_key
def _validate_openai_api_key(direct_mode: bool, api_key: Optional[str]) -> str:if not direct_mode:return Noneif api_key is None:api_key = os.environ.get("OPENAI_API_KEY")if api_key is None:warnings.warn("OPENAI_API_KEY is missing when trying to use direct mode. ""Falling back to Unify API.",)return api_key
4
11
2
52
1
37
47
37
direct_mode,api_key
['api_key']
str
{"Assign": 1, "Expr": 1, "If": 3, "Return": 2}
2
11
2
["os.environ.get", "warnings.warn"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.base_py._Client.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.multi_llm_py._MultiClient.__init__"]
The function (_validate_openai_api_key) defined within the public class called public.The function start at line 37 and ends at 47. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [37.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["os.environ.get", "warnings.warn"], It has 2.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.base_py._Client.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.multi_llm_py._MultiClient.__init__"].
unifyai_unify
public
public
0
0
_default
def _default(value: Any, default_value: Any) -> Any:return value if value is not None else default_value
2
2
2
22
0
50
51
50
value,default_value
[]
Any
{"Return": 1}
0
2
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955608_simplejson_simplejson.simplejson.encoder_py._make_iterencode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.multi_llm_py._MultiClient.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.generate"]
The function (_default) defined within the public class called public.The function start at line 50 and ends at 51. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [50.0] and does not return any value. It has 3.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955608_simplejson_simplejson.simplejson.encoder_py._make_iterencode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.multi_llm_py._MultiClient.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.generate"].
unifyai_unify
public
public
0
0
_dict_aligns_with_pydantic
def _dict_aligns_with_pydantic(dict_in: Dict, pydantic_cls: type(BaseModel)) -> bool:try:pydantic_cls.model_validate(dict_in)return Trueexcept ValidationError:return False
2
6
2
31
0
54
59
54
dict_in,pydantic_cls
[]
bool
{"Expr": 1, "Return": 2, "Try": 1}
2
6
2
["type", "pydantic_cls.model_validate"]
0
[]
The function (_dict_aligns_with_pydantic) defined within the public class called public.The function start at line 54 and ends at 59. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [54.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functions called inside which are ["type", "pydantic_cls.model_validate"].
unifyai_unify
public
public
0
0
_make_json_serializable
def _make_json_serializable(item: Any,) -> Union[Dict, List, Tuple]:# Add a recursion guard using getattr to avoid infinite recursionif hasattr(item, "_being_serialized") and getattr(item, "_being_serialized", False):return "<circular reference>"try:# For objects that might cause recursion, set a flagif hasattr(item, "__dict__") and not isinstance(item,(dict, list, tuple, BaseModel),):setattr(item, "_being_serialized", True)if isinstance(item, list):result = [_make_json_serializable(i) for i in item]elif isinstance(item, dict):result = {k: _make_json_serializable(v) for k, v in item.items()}elif isinstance(item, tuple):result = tuple(_make_json_serializable(i) for i in item)elif inspect.isclass(item) and issubclass(item, BaseModel):result = item.model_json_schema()elif isinstance(item, BaseModel):result = item.model_dump()elif hasattr(item, "json") and callable(item.json):result = _make_json_serializable(item.json())# Handle threading objects specificallyelif "threading" in type(item).__module__:result = f"<{type(item).__name__} at {id(item)}>"elif isinstance(item, (int, float, bool, str, type(None))):result = itemelse:try:result = json.dumps(item)except Exception:try:result = str(item)except Exception:result = f"<{type(item).__name__} at {id(item)}>"return resultfinally:# Clean up the recursion guard flagif hasattr(item, "__dict__") and not isinstance(item,(dict, list, tuple, BaseModel),):try:delattr(item, "_being_serialized")except (AttributeError, TypeError):pass
24
45
1
315
1
62
113
62
item
['result']
Union[Dict, List, Tuple]
{"Assign": 11, "Expr": 2, "If": 11, "Return": 2, "Try": 4}
34
52
34
["hasattr", "getattr", "hasattr", "isinstance", "setattr", "isinstance", "_make_json_serializable", "isinstance", "_make_json_serializable", "item.items", "isinstance", "tuple", "_make_json_serializable", "inspect.isclass", "issubclass", "item.model_json_schema", "isinstance", "item.model_dump", "hasattr", "callable", "_make_json_serializable", "item.json", "type", "type", "id", "isinstance", "type", "json.dumps", "str", "type", "id", "hasattr", "isinstance", "delattr"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Traced.__enter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Traced.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py._Traced.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py._create_span", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.helpers_py._make_json_serializable"]
The function (_make_json_serializable) defined within the public class called public.The function start at line 62 and ends at 113. It contains 45 lines of code and it has a cyclomatic complexity of 24. The function does not take any parameters and does not return any value. It declares 34.0 functions, It has 34.0 functions called inside which are ["hasattr", "getattr", "hasattr", "isinstance", "setattr", "isinstance", "_make_json_serializable", "isinstance", "_make_json_serializable", "item.items", "isinstance", "tuple", "_make_json_serializable", "inspect.isclass", "issubclass", "item.model_json_schema", "isinstance", "item.model_dump", "hasattr", "callable", "_make_json_serializable", "item.json", "type", "type", "id", "isinstance", "type", "json.dumps", "str", "type", "id", "hasattr", "isinstance", "delattr"], It has 5.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Traced.__enter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Traced.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py._Traced.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py._create_span", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.helpers_py._make_json_serializable"].
unifyai_unify
public
public
0
0
_get_and_maybe_create_project
def _get_and_maybe_create_project(project: Optional[str] = None,required: bool = True,api_key: Optional[str] = None,create_if_missing: bool = False,) -> Optional[str]:# noinspection PyUnresolvedReferencesfrom unify.logging.utils.logs import ASYNC_LOGGINGapi_key = _validate_api_key(api_key)if project is None:project = unify.active_project()if project is None:if required:project = "_"else:return Noneif not create_if_missing:return projectif ASYNC_LOGGING:# acquiring the project lock here will block the async logger# so we skip the lock if we are in async modereturn projectwith PROJECT_LOCK:if project not in unify.list_projects(api_key=api_key):unify.create_project(project, api_key=api_key)return project
7
23
4
121
2
116
142
116
project,required,api_key,create_if_missing
['api_key', 'project']
Optional[str]
{"Assign": 3, "Expr": 1, "If": 6, "Return": 4, "With": 1}
4
27
4
["_validate_api_key", "unify.active_project", "unify.list_projects", "unify.create_project"]
31
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.add_logs_to_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.commit_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.create_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.create_contexts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.delete_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_context_commits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_contexts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.rename_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.rollback_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.add_dataset_entries", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.delete_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.download_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.upload_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._add_to_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_derived_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_log_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_groups", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_log_by_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_logs"]
The function (_get_and_maybe_create_project) defined within the public class called public.The function start at line 116 and ends at 142. It contains 23 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [116.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called inside which are ["_validate_api_key", "unify.active_project", "unify.list_projects", "unify.create_project"], It has 31.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.add_logs_to_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.commit_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.create_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.create_contexts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.delete_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_context_commits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.get_contexts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.rename_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.rollback_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.add_dataset_entries", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.delete_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.download_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.datasets_py.upload_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._add_to_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_derived_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.create_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_log_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.delete_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_groups", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_log_by_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py.get_logs"].
unifyai_unify
public
public
0
0
_prune_dict.keep
def keep(v):if v in (None, "NOT_GIVEN"):return Falseelse:ret = _prune_dict(v)if isinstance(ret, dict) or isinstance(ret, list) or isinstance(ret, tuple):return bool(ret)return True
5
8
1
53
0
146
153
146
null
[]
None
null
0
0
0
null
0
null
The function (_prune_dict.keep) defined within the public class called public.The function start at line 146 and ends at 153. It contains 8 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
_prune_dict
def _prune_dict(val):def keep(v):if v in (None, "NOT_GIVEN"):return Falseelse:ret = _prune_dict(v)if isinstance(ret, dict) or isinstance(ret, list) or isinstance(ret, tuple):return bool(ret)return Trueif (not isinstance(val, dict)and not isinstance(val, list)and not isinstance(val, tuple)):return valelif isinstance(val, dict):return {k: _prune_dict(v) for k, v in val.items() if keep(v)}elif isinstance(val, list):return [_prune_dict(v) for i, v in enumerate(val) if keep(v)]else:return tuple(_prune_dict(v) for i, v in enumerate(val) if keep(v))
12
14
1
121
1
145
166
145
val
['ret']
Returns
{"Assign": 1, "If": 5, "Return": 7}
20
22
20
["_prune_dict", "isinstance", "isinstance", "isinstance", "bool", "isinstance", "isinstance", "isinstance", "isinstance", "_prune_dict", "val.items", "keep", "isinstance", "_prune_dict", "enumerate", "keep", "tuple", "_prune_dict", "enumerate", "keep"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.task_sdk.src.airflow.sdk.definitions.connection_py.Connection.to_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.task_sdk.src.airflow.sdk.definitions.connection_py._prune_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py._finalize_span", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.helpers_py._prune_dict"]
The function (_prune_dict) defined within the public class called public.The function start at line 145 and ends at 166. It contains 14 lines of code and it has a cyclomatic complexity of 12. The function does not take any parameters, and this function return a value. It declares 20.0 functions, It has 20.0 functions called inside which are ["_prune_dict", "isinstance", "isinstance", "isinstance", "bool", "isinstance", "isinstance", "isinstance", "isinstance", "_prune_dict", "val.items", "keep", "isinstance", "_prune_dict", "enumerate", "keep", "tuple", "_prune_dict", "enumerate", "keep"], It has 4.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.task_sdk.src.airflow.sdk.definitions.connection_py.Connection.to_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.task_sdk.src.airflow.sdk.definitions.connection_py._prune_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py._finalize_span", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.helpers_py._prune_dict"].
unifyai_unify
public
public
0
0
flexible_deepcopy._attempt
def _attempt(value: Any) -> Union[Any, _SkipType]:"""Try to deepcopy *value*; fall back per on_fail."""try:return flexible_deepcopy(value, on_fail, _memo)except Exception:if on_fail == "raise":raiseif on_fail == "shallow":return valueif on_fail == "skip":return _SKIPraise ValueError(f"Invalid on_fail option: {on_fail!r}")
5
11
1
55
0
223
234
223
null
[]
None
null
0
0
0
null
0
null
The function (flexible_deepcopy._attempt) defined within the public class called public.The function start at line 223 and ends at 234. It contains 11 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
flexible_deepcopy
def flexible_deepcopy(obj: Any,on_fail: str = "raise",_memo: Optional[Dict[int, Any]] = None,) -> Any:"""Perform a deepcopy that tolerates un‑copyable elements.Parameters----------obj : AnyThe object you wish to copy.on_fail : {'raise', 'skip', 'shallow'}, default 'raise'β€’ 'raise' – re‑raise copy error (standard behaviour).β€’ 'skip'– drop the offending element from the result.β€’ 'shallow' – insert the original element unchanged._memo : dict or None (internal)Memoisation dict to preserve identity & avoid infinite recursion.Returns-------AnyA deep‑copied version of *obj*, modified per *on_fail* strategy.Raises------ValueErrorIf *on_fail* is not one of the accepted values.ExceptionRe‑raises whatever copy error occurred when *on_fail* == 'raise'."""if _memo is None:_memo = {}obj_id = id(obj)if obj_id in _memo:# Handle circular references.return _memo[obj_id]def _attempt(value: Any) -> Union[Any, _SkipType]:"""Try to deepcopy *value*; fall back per on_fail."""try:return flexible_deepcopy(value, on_fail, _memo)except Exception:if on_fail == "raise":raiseif on_fail == "shallow":return valueif on_fail == "skip":return _SKIPraise ValueError(f"Invalid on_fail option: {on_fail!r}")# --- Handle built‑in containers explicitly ---------------------------if isinstance(obj, dict):result: Dict[Any, Any] = {}_memo[obj_id] = result# Early memoisation for cyclesfor k, v in obj.items():nk = _attempt(k)nv = _attempt(v)if _SKIP in (nk, nv):# Skip entry if key or value failedcontinueresult[nk] = nvreturn resultif isinstance(obj, list):result: List[Any] = []_memo[obj_id] = resultfor item in obj:nitem = _attempt(item)if nitem is not _SKIP:result.append(nitem)return resultif isinstance(obj, tuple):items = []_memo[obj_id] = None# Placeholder for circular refsfor item in obj:nitem = _attempt(item)if nitem is not _SKIP:items.append(nitem)result = tuple(items)_memo[obj_id] = resultreturn resultif isinstance(obj, set):result: Set[Any] = set()_memo[obj_id] = resultfor item in obj:nitem = _attempt(item)if nitem is not _SKIP:result.add(nitem)return result# --- Non‑container: fall back to standard deepcopy -------------------try:result = copy.deepcopy(obj, _memo)_memo[obj_id] = resultreturn resultexcept Exception:if on_fail == "raise":raiseif on_fail == "shallow":_memo[obj_id] = objreturn objif on_fail == "skip":return _SKIPraise ValueError(f"Invalid on_fail option: {on_fail!r}")
19
60
3
331
7
185
290
185
obj,on_fail,_memo
['nv', 'obj_id', 'nitem', 'nk', 'items', 'result', '_memo']
Any
{"AnnAssign": 3, "Assign": 18, "Expr": 5, "For": 4, "If": 16, "Return": 11, "Try": 2}
20
106
20
["id", "flexible_deepcopy", "ValueError", "isinstance", "obj.items", "_attempt", "_attempt", "isinstance", "_attempt", "result.append", "isinstance", "_attempt", "items.append", "tuple", "isinstance", "set", "_attempt", "result.add", "copy.deepcopy", "ValueError"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_mutability", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.helpers_py.flexible_deepcopy"]
The function (flexible_deepcopy) defined within the public class called public.The function start at line 185 and ends at 290. It contains 60 lines of code and it has a cyclomatic complexity of 19. It takes 3 parameters, represented as [185.0] and does not return any value. It declares 20.0 functions, It has 20.0 functions called inside which are ["id", "flexible_deepcopy", "ValueError", "isinstance", "obj.items", "_attempt", "_attempt", "isinstance", "_attempt", "result.append", "isinstance", "_attempt", "items.append", "tuple", "isinstance", "set", "_attempt", "result.add", "copy.deepcopy", "ValueError"], It has 3.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_mutability", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.helpers_py.flexible_deepcopy"].
unifyai_unify
RequestError
public
0
1
__init__
def __init__(self, url: str, r_type: str, response: requests.Response, /, **kwargs):super().__init__(f"{r_type}:{url} with {kwargs} failed with status code {response.status_code}: {response.text}",)self.response = response
1
5
5
39
0
22
26
22
self,url,r_type,response,**kwargs
[]
None
{"Assign": 1, "Expr": 1}
2
5
2
["__init__", "super"]
14,667
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ParameterValidationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.RequestError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.http_client_py.HTTPClient.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Command.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Group.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._context_py.Context.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._option_groups_py.OptionGroupMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Argument.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Option.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._sections_py.SectionMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._util_py.FrozenSpaceMeta.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.AcceptBetween.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.RequireExactly.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._support_py.ConstraintMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.ConstraintViolated.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.UnsatisfiableConstraint.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.formatting._formatter_py.HelpFormatter.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.tests.test_commands_py.test_group_command_class_is_used_to_create_subcommands", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.explorer_py.MainWindow.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.search_filter_py.QudFilterModel.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudObjTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudPopTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudTreeView.__init__"]
The function (__init__) defined within the public class called RequestError, that inherit another class.The function start at line 22 and ends at 26. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [22.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["__init__", "super"], It has 14667.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ParameterValidationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.RequestError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.http_client_py.HTTPClient.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Command.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Group.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._context_py.Context.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._option_groups_py.OptionGroupMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Argument.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Option.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._sections_py.SectionMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._util_py.FrozenSpaceMeta.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.AcceptBetween.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.RequireExactly.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._support_py.ConstraintMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.ConstraintViolated.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.UnsatisfiableConstraint.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.formatting._formatter_py.HelpFormatter.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.tests.test_commands_py.test_group_command_class_is_used_to_create_subcommands", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.explorer_py.MainWindow.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.search_filter_py.QudFilterModel.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudObjTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudPopTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudTreeView.__init__"].
unifyai_unify
public
public
0
0
_log
def _log(type: str, url: str, mask_key: bool = True, /, **kwargs):_kwargs_str = ""if mask_key and "headers" in kwargs:key = kwargs["headers"]["Authorization"]kwargs["headers"]["Authorization"] = "***"for k, v in kwargs.items():if isinstance(v, dict):_kwargs_str += f"{k:}:{json.dumps(v, indent=2)},\n"else:_kwargs_str += f"{k}:{v},\n"if mask_key and "headers" in kwargs:kwargs["headers"]["Authorization"] = keylog_msg = f"""====== {type} =======url:{url}{_kwargs_str}"""_LOGGER.debug(log_msg)
7
13
4
105
3
29
49
29
type,url,mask_key,**kwargs
['log_msg', '_kwargs_str', 'key']
None
{"Assign": 5, "AugAssign": 2, "Expr": 1, "For": 1, "If": 3}
4
21
4
["kwargs.items", "isinstance", "json.dumps", "_LOGGER.debug"]
14
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3672733_nose_devs_nose.functional_tests.doc_tests.test_multiprocess.support.test_shared_py.setup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687139_erotemic_xdoctest.src.xdoctest.runner_py._print_summary_report", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687139_erotemic_xdoctest.src.xdoctest.runner_py._run_examples", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687139_erotemic_xdoctest.src.xdoctest.runner_py.doctest_module", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.ActionAppendDeprecated.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.ActionStoreDeprecated.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py._check_or_get_base_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py._fix_chart_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py._run_cmd", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py._update_values_file_with_modifications", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.build_chart", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.build_images", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.publish_pages", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py._log_request_if_enabled"]
The function (_log) defined within the public class called public.The function start at line 29 and ends at 49. It contains 13 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [29.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called inside which are ["kwargs.items", "isinstance", "json.dumps", "_LOGGER.debug"], It has 14.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3672733_nose_devs_nose.functional_tests.doc_tests.test_multiprocess.support.test_shared_py.setup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687139_erotemic_xdoctest.src.xdoctest.runner_py._print_summary_report", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687139_erotemic_xdoctest.src.xdoctest.runner_py._run_examples", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687139_erotemic_xdoctest.src.xdoctest.runner_py.doctest_module", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.ActionAppendDeprecated.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.ActionStoreDeprecated.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py._check_or_get_base_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py._fix_chart_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py._run_cmd", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py._update_values_file_with_modifications", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.build_chart", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.build_images", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3922061_jupyterhub_chartpress.chartpress_py.publish_pages", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py._log_request_if_enabled"].
unifyai_unify
public
public
0
0
_mask_auth_key
def _mask_auth_key(kwargs: dict):if "headers" in kwargs:kwargs["headers"]["Authorization"] = "***"return kwargs
2
4
1
23
0
52
55
52
kwargs
[]
Returns
{"Assign": 1, "If": 1, "Return": 1}
0
4
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.request"]
The function (_mask_auth_key) defined within the public class called public.The function start at line 52 and ends at 55. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.request"].
unifyai_unify
public
public
0
0
_log_request_if_enabled.inner
def inner(method, url, **kwargs):_log(f"{method}", url, True, **kwargs)res: requests.Response = fn(method, url, **kwargs)try:_log(f"{method} response:{res.status_code}", url, response=res.json())except requests.exceptions.JSONDecodeError:_log(f"{method} response:{res.status_code}", url, response=res.text)return res
2
8
3
76
0
66
73
66
null
[]
None
null
0
0
0
null
0
null
The function (_log_request_if_enabled.inner) defined within the public class called public.The function start at line 66 and ends at 73. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [66.0] and does not return any value..
unifyai_unify
public
public
0
0
_log_request_if_enabled
def _log_request_if_enabled(fn: Callable) -> Callable:"""Only wrap request function if logging is enabled."""if not _LOG_ENABLED:return fn@wraps(fn)def inner(method, url, **kwargs):_log(f"{method}", url, True, **kwargs)res: requests.Response = fn(method, url, **kwargs)try:_log(f"{method} response:{res.status_code}", url, response=res.json())except requests.exceptions.JSONDecodeError:_log(f"{method} response:{res.status_code}", url, response=res.text)return resreturn inner
2
6
1
25
0
58
75
58
fn
[]
Callable
{"AnnAssign": 1, "Expr": 4, "If": 1, "Return": 3, "Try": 1}
6
18
6
["_log", "fn", "_log", "res.json", "_log", "wraps"]
0
[]
The function (_log_request_if_enabled) defined within the public class called public.The function start at line 58 and ends at 75. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["_log", "fn", "_log", "res.json", "_log", "wraps"].
unifyai_unify
public
public
0
0
request
def request(method, url, **kwargs) -> requests.Response:try:res = _SESSION.request(method, url, **kwargs)res.raise_for_status()return resexcept requests.exceptions.HTTPError as e:kwargs = _mask_auth_key(kwargs)raise RequestError(url, method, e.response, **kwargs)
2
8
3
65
2
79
86
79
method,url,**kwargs
['kwargs', 'res']
requests.Response
{"Assign": 2, "Expr": 1, "Return": 1, "Try": 1}
4
8
4
["_SESSION.request", "res.raise_for_status", "_mask_auth_key", "RequestError"]
29
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.cli.request_py.RequestCommand._run_many_requests", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.cli.request_py.RequestCommand._run_one_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.data_py.listfiles", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.gitsome.lib.github3.session_py.GitHubSession.handle_two_factor_auth", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.gitsome.lib.github3.session_py.GitHubSession.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3930807_kane610_deconz.pydeconz.utils_py.delete_all_keys", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3930807_kane610_deconz.pydeconz.utils_py.delete_api_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3930807_kane610_deconz.pydeconz.utils_py.discovery", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3930807_kane610_deconz.pydeconz.utils_py.get_bridge_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3951871_gnocchixyz_python_gnocchiclient.gnocchiclient.client_py.SessionClient.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981967_kiwigrid_k8s_sidecar.src.resources_py._get_file_data_and_name", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981967_kiwigrid_k8s_sidecar.src.resources_py._watch_resource_iterator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981967_kiwigrid_k8s_sidecar.src.resources_py.list_resources", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69609923_rtk_rnjn_parrot.cogs.fun.fun_py.Fun.animal_fact", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69750082_okorach_sonar_tools.sonar.platform_py.Platform.__run_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70411340_rhos_infra_cibyl.cibyl.sources.source_py.safe_request_generic", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.79568523_dawn_india_z_mirror.myjd.myjdapi_py.clientSession.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.79568523_dawn_india_z_mirror.sabnzbdapi.requests_py.SabnzbdSession.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.88796544_hyundai_kia_connect_hyundai_kia_connect_api.hyundai_kia_connect_api.KiaUvoApiCA_py.RetrySession._request_with_retry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.google.src.airflow.providers.google.cloud.hooks.datafusion_py.DataFusionHook._cdap_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.google.tests.unit.google.common.hooks.test_base_google_py.TestGoogleBaseHook.test_authorize_assert_user_agent_is_sent", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.task_sdk.src.airflow.sdk.api.client_py.Client.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.head"]
The function (request) defined within the public class called public.The function start at line 79 and ends at 86. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [79.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called inside which are ["_SESSION.request", "res.raise_for_status", "_mask_auth_key", "RequestError"], It has 29.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.cli.request_py.RequestCommand._run_many_requests", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.cli.request_py.RequestCommand._run_one_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.data_py.listfiles", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.gitsome.lib.github3.session_py.GitHubSession.handle_two_factor_auth", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.gitsome.lib.github3.session_py.GitHubSession.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3930807_kane610_deconz.pydeconz.utils_py.delete_all_keys", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3930807_kane610_deconz.pydeconz.utils_py.delete_api_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3930807_kane610_deconz.pydeconz.utils_py.discovery", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3930807_kane610_deconz.pydeconz.utils_py.get_bridge_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3951871_gnocchixyz_python_gnocchiclient.gnocchiclient.client_py.SessionClient.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981967_kiwigrid_k8s_sidecar.src.resources_py._get_file_data_and_name", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981967_kiwigrid_k8s_sidecar.src.resources_py._watch_resource_iterator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3981967_kiwigrid_k8s_sidecar.src.resources_py.list_resources", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69609923_rtk_rnjn_parrot.cogs.fun.fun_py.Fun.animal_fact", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69750082_okorach_sonar_tools.sonar.platform_py.Platform.__run_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70411340_rhos_infra_cibyl.cibyl.sources.source_py.safe_request_generic", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.79568523_dawn_india_z_mirror.myjd.myjdapi_py.clientSession.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.79568523_dawn_india_z_mirror.sabnzbdapi.requests_py.SabnzbdSession.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.88796544_hyundai_kia_connect_hyundai_kia_connect_api.hyundai_kia_connect_api.KiaUvoApiCA_py.RetrySession._request_with_retry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.google.src.airflow.providers.google.cloud.hooks.datafusion_py.DataFusionHook._cdap_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.google.tests.unit.google.common.hooks.test_base_google_py.TestGoogleBaseHook.test_authorize_assert_user_agent_is_sent", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.task_sdk.src.airflow.sdk.api.client_py.Client.request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.head"].
unifyai_unify
public
public
0
0
get
def get(url, params=None, **kwargs):return request("GET", url, params=params, **kwargs)
1
2
3
26
0
89
90
89
url,params,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
3,001
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.app_py.App.config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.app_py.PluginsApp.installed_plugins", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.DetailEndpoint.list", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint._validate_openapi_parameters", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.models.dcim_py.TraceableRecord.trace", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.http_client_py.HTTPClient.get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.duckhunt_py.ducks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.irc_py.irc", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.karma_py.karma", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.ree_py.ree", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.seen_py.seen", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.tell_py.tell", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.protocol.slack_py.SlackClient.get_channel", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.attribute.attribute_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.entity.entity_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.relation.relation_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_all", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_nonpositive_throws", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_nonsense_throws", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_one", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_infer_false", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_infer_true", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.qudobject_wiki_py.QudObjectWiki.wiki_namespace", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.couchdb.__init___py.CouchDBBackend.get_models", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.memory.__init___py.MemoryBackend.get_models"]
The function (get) defined within the public class called public.The function start at line 89 and ends at 90. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [89.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside which is ["request"], It has 3001.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.app_py.App.config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.app_py.PluginsApp.installed_plugins", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.DetailEndpoint.list", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint._validate_openapi_parameters", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.models.dcim_py.TraceableRecord.trace", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.http_client_py.HTTPClient.get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.duckhunt_py.ducks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.irc_py.irc", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.karma_py.karma", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.ree_py.ree", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.seen_py.seen", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.tell_py.tell", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.protocol.slack_py.SlackClient.get_channel", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.attribute.attribute_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.entity.entity_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.relation.relation_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_all", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_nonpositive_throws", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_nonsense_throws", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_one", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_infer_false", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_infer_true", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.qudobject_wiki_py.QudObjectWiki.wiki_namespace", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.couchdb.__init___py.CouchDBBackend.get_models", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.memory.__init___py.MemoryBackend.get_models"].
unifyai_unify
public
public
0
0
options
def options(url, **kwargs):return request("OPTIONS", url, **kwargs)
1
2
2
18
0
93
94
93
url,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
175
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.choices", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_flask_py.test_automatic_options", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_flask_py.test_hello_options", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3925410_remyroy_cdda_game_launcher.cddagl.sql.functions_py.get_build_from_sha256", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3925410_remyroy_cdda_game_launcher.cddagl.sql.functions_py.new_build", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3962390_keselekpermen69_userbutt.userbot.modules.screencapture_py.capture", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3962390_keselekpermen69_userbutt.userbot.utils.chrome_py.chrome", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3985013_aio_libs_aiohttp_security.demo.database_auth.db_auth_py.DBAuthorizationPolicy.permits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69413963_alpa_projects_alpa.alpa.collective.collective_group.gloo_collective_group_py.Rendezvous.meet", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484938_astronomer_astronomer_providers._circleci.integration_tests.airflow_dag_introspection_py.check_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.process.__init___py.process_tracks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.process.__init___py.process_tracks_loop", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py._load_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py._return_tracks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py.delete_track_comment", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py.get_track_comments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py.post_track_comment", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api.common.mark_tasks_py.get_all_dag_task_query", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.assets_py.get_asset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.assets_py.get_asset_queued_events", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.assets_py.get_dag_asset_queued_events", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.backfills_py.cancel_backfill", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.backfills_py.get_backfill", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.backfills_py.list_backfills", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.backfills_py.pause_backfill"]
The function (options) defined within the public class called public.The function start at line 93 and ends at 94. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [93.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside which is ["request"], It has 175.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.choices", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_flask_py.test_automatic_options", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_flask_py.test_hello_options", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3925410_remyroy_cdda_game_launcher.cddagl.sql.functions_py.get_build_from_sha256", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3925410_remyroy_cdda_game_launcher.cddagl.sql.functions_py.new_build", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3962390_keselekpermen69_userbutt.userbot.modules.screencapture_py.capture", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3962390_keselekpermen69_userbutt.userbot.utils.chrome_py.chrome", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3985013_aio_libs_aiohttp_security.demo.database_auth.db_auth_py.DBAuthorizationPolicy.permits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69413963_alpa_projects_alpa.alpa.collective.collective_group.gloo_collective_group_py.Rendezvous.meet", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484938_astronomer_astronomer_providers._circleci.integration_tests.airflow_dag_introspection_py.check_log", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.process.__init___py.process_tracks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.process.__init___py.process_tracks_loop", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py._load_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py._return_tracks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py.delete_track_comment", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py.get_track_comments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69536117_openbikesensor_portal.api.obs.api.routes.tracks_py.post_track_comment", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api.common.mark_tasks_py.get_all_dag_task_query", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.assets_py.get_asset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.assets_py.get_asset_queued_events", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.assets_py.get_dag_asset_queued_events", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.backfills_py.cancel_backfill", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.backfills_py.get_backfill", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.backfills_py.list_backfills", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.backfills_py.pause_backfill"].
unifyai_unify
public
public
0
0
head
def head(url, **kwargs):return request("HEAD", url, **kwargs)
1
2
2
18
0
97
98
97
url,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
16
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy._cpwsgi_py.CPWSGIApp.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_pretty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_xhtml", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.inspectors_py.Inspector.pdoc", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957963_xflr6_graphviz.graphviz.dot_py.Dot.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484112_nypl_ami_preservation.ami_scripts.ami_single_collection_processor_py.ReportGenerator._create_format_analysis_streamlined", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484112_nypl_ami_preservation.ami_scripts.ami_single_collection_processor_py.ReportGenerator._create_summary_page", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484112_nypl_ami_preservation.ami_scripts.digitization_performance_tracker_py.save_plot_to_pdf", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484112_nypl_ami_preservation.ami_scripts.old_scripts.media_production_stats_py.plot_object_format_counts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70178690_paddlepaddle_paddlers.paddlers.models.paddleseg.models.bisenetv1_py.BiseNetV1.forward", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70555013_embeddings_benchmark_mteb.mteb.load_results.benchmark_results_py.BenchmarkResults.join_revisions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70599077_arnaudmiribel_streamlit_extras.src.streamlit_extras.altex.__init___py.example_bar_sorted", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.90033906_opengeos_leafmap.leafmap.common_py.select_largest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94657204_JuanBindez_pytubefix.pytubefix.request_py.filesize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94657204_JuanBindez_pytubefix.pytubefix.request_py.seq_filesize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95085986_MLSysOps_MLE_agent.mle.function.data_py.preview_csv_data"]
The function (head) defined within the public class called public.The function start at line 97 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [97.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside which is ["request"], It has 16.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy._cpwsgi_py.CPWSGIApp.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_pretty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_xhtml", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.inspectors_py.Inspector.pdoc", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957963_xflr6_graphviz.graphviz.dot_py.Dot.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484112_nypl_ami_preservation.ami_scripts.ami_single_collection_processor_py.ReportGenerator._create_format_analysis_streamlined", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484112_nypl_ami_preservation.ami_scripts.ami_single_collection_processor_py.ReportGenerator._create_summary_page", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484112_nypl_ami_preservation.ami_scripts.digitization_performance_tracker_py.save_plot_to_pdf", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69484112_nypl_ami_preservation.ami_scripts.old_scripts.media_production_stats_py.plot_object_format_counts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70178690_paddlepaddle_paddlers.paddlers.models.paddleseg.models.bisenetv1_py.BiseNetV1.forward", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70555013_embeddings_benchmark_mteb.mteb.load_results.benchmark_results_py.BenchmarkResults.join_revisions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70599077_arnaudmiribel_streamlit_extras.src.streamlit_extras.altex.__init___py.example_bar_sorted", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.90033906_opengeos_leafmap.leafmap.common_py.select_largest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94657204_JuanBindez_pytubefix.pytubefix.request_py.filesize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94657204_JuanBindez_pytubefix.pytubefix.request_py.seq_filesize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95085986_MLSysOps_MLE_agent.mle.function.data_py.preview_csv_data"].
unifyai_unify
public
public
0
0
post
def post(url, data=None, json=None, **kwargs):return request("POST", url, data=data, json=json, **kwargs)
1
2
4
34
0
101
102
101
url,data,json,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
41
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.api_py.Api.create_token", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.DetailEndpoint.create", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.create", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3635751_kinecosystem_blockchain_ops.tests.python.helpers_py.channel_create_accounts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3635751_kinecosystem_blockchain_ops.tests.python.helpers_py.send_txs_multiple_endpoints", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.views_py.TranslatableBaseCreateView.post", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.views_py.TranslatableBaseUpdateView.post", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660028_openprocurement_openprocurement_auction.openprocurement.auction.tests.test_auction_server_py.TestAuctionsServer.test_log_post_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701027_amosbastian_fpl.fpl.models.user_py.User._post_substitutions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701027_amosbastian_fpl.fpl.models.user_py.User.transfer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3920273_andialbrecht_sqlparse.sqlparse.engine.grouping_py._group", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.create_image", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.create_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.create_volume_claim", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.deploy_archived_service", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.deploy_managed_service", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.deploy_manifest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.request_service_action", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.request_service_rollback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.domain_client_py.add_domain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.domain_client_py.create_certificate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.domain_client_py.verify_domain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.exec_client_py.post_exec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.exec_client_py.post_session", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.secrets_client_py.create_secret"]
The function (post) defined within the public class called public.The function start at line 101 and ends at 102. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [101.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside which is ["request"], It has 41.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.api_py.Api.create_token", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.DetailEndpoint.create", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.create", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3635751_kinecosystem_blockchain_ops.tests.python.helpers_py.channel_create_accounts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3635751_kinecosystem_blockchain_ops.tests.python.helpers_py.send_txs_multiple_endpoints", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.views_py.TranslatableBaseCreateView.post", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.views_py.TranslatableBaseUpdateView.post", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660028_openprocurement_openprocurement_auction.openprocurement.auction.tests.test_auction_server_py.TestAuctionsServer.test_log_post_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701027_amosbastian_fpl.fpl.models.user_py.User._post_substitutions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701027_amosbastian_fpl.fpl.models.user_py.User.transfer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3920273_andialbrecht_sqlparse.sqlparse.engine.grouping_py._group", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.create_image", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.create_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.create_volume_claim", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.deploy_archived_service", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.deploy_managed_service", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.deploy_manifest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.request_service_action", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.__init___py.request_service_rollback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.domain_client_py.add_domain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.domain_client_py.create_certificate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.domain_client_py.verify_domain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.exec_client_py.post_exec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.exec_client_py.post_session", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.fandogh_client.secrets_client_py.create_secret"].
unifyai_unify
public
public
0
0
put
def put(url, data=None, **kwargs):return request("PUT", url, data=data, **kwargs)
1
2
3
26
0
105
106
105
url,data,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
51
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.attribute.attribute_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.entity.entity_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.relation.relation_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.models.private_key_py.PrivateKey.set_api", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.models.private_key_py.PrivateKey.set_oauth", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_create_requires_new_version_number", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_create_requires_uploader", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_packages_py.PackagesTest.test_api_get_package_without_versions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.test_packages_py.PackagesTest.test_get_package_json_with_versions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.test_packages_py.PackagesTest.test_get_package_json_without_versions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.test_packages_py.PackagesTest.test_get_unowned_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_models.test_package_py.PackageTest.test_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_models.test_package_py.PackageTest.test_has_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.testcase_py.TestCase.create_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.eventloop_test_py.EventLoopTests.testCleanUpStaleEvents", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.metadata_test_py.MetadataTests.testGetKinds", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.metadata_test_py.MetadataTests.testGetNamespaces", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.metadata_test_py.MetadataTests.testGetPropertiesOfKind", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.polymodel_test_py.PolyModelTests.testBasics", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660028_openprocurement_openprocurement_auction.openprocurement.auction.event_source_py.send_event_to_client", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3663914_mozilla_releng_build_cloud_tools.cloudtools.aws.ami_py.ami_cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3663914_mozilla_releng_build_cloud_tools.cloudtools.scripts.aws_create_ami_py.create_ami", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3663914_mozilla_releng_build_cloud_tools.cloudtools.scripts.aws_create_ami_py.sync", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.dogpile.cache.plugins.mako_cache_py.MakoPlugin.put", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3916340_paulscherrerinstitute_pcaspy.pcaspy.driver_py.SimplePV.updateValue"]
The function (put) defined within the public class called public.The function start at line 105 and ends at 106. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [105.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside which is ["request"], It has 51.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.attribute.attribute_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.entity.entity_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.relation.relation_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.models.private_key_py.PrivateKey.set_api", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.models.private_key_py.PrivateKey.set_oauth", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_create_requires_new_version_number", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_create_requires_uploader", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_packages_py.PackagesTest.test_api_get_package_without_versions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.test_packages_py.PackagesTest.test_get_package_json_with_versions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.test_packages_py.PackagesTest.test_get_package_json_without_versions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.test_packages_py.PackagesTest.test_get_unowned_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_models.test_package_py.PackageTest.test_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_models.test_package_py.PackageTest.test_has_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.testcase_py.TestCase.create_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.eventloop_test_py.EventLoopTests.testCleanUpStaleEvents", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.metadata_test_py.MetadataTests.testGetKinds", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.metadata_test_py.MetadataTests.testGetNamespaces", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.metadata_test_py.MetadataTests.testGetPropertiesOfKind", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.polymodel_test_py.PolyModelTests.testBasics", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660028_openprocurement_openprocurement_auction.openprocurement.auction.event_source_py.send_event_to_client", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3663914_mozilla_releng_build_cloud_tools.cloudtools.aws.ami_py.ami_cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3663914_mozilla_releng_build_cloud_tools.cloudtools.scripts.aws_create_ami_py.create_ami", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3663914_mozilla_releng_build_cloud_tools.cloudtools.scripts.aws_create_ami_py.sync", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.dogpile.cache.plugins.mako_cache_py.MakoPlugin.put", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3916340_paulscherrerinstitute_pcaspy.pcaspy.driver_py.SimplePV.updateValue"].
unifyai_unify
public
public
0
0
patch
def patch(url, data=None, **kwargs):return request("PATCH", url, data=data, **kwargs)
1
2
3
26
0
109
110
109
url,data,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
3,062
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_id_generators_py.KoremutakeGeneratorTest.test_it_doesnt_reuse_a_name_twice", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.base_py.BaseTestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.AlertSubscriptionTestCase.test_send_alerts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.AlertSubscriptionTestCase.test_send_results_bad_email_template", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.AlertSubscriptionTestCase.test_send_results_email_text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.AlertSubscriptionTestCase.test_send_results_good_email_template", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.RepoguardTestCase.test_check_and_alert_on_new_repos", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repository_handler_py.RepositoryHandlerTestCase.test_create_repo_list_and_status_from_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repository_handler_py.RepositoryTestCase.test_detect_new_commit_hashes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repository_handler_py.RepositoryTestCase.test_get_last_commit_hashes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_add_windows_hostvars", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_add_windows_hostvars_to_linux", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_build_hostvars_dynamic_groups", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_find_hostvars_single_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_find_hostvars_single_server_none", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_parse_groups_result_to_dict_empty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_print_inventory_json", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_modify_server_py.TestClcModifyServerFunctions.test_modify_remove_nic_calls_remove_nic_on_server_with_wait", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_modify_server_py.TestClcModifyServerFunctions.test_modify_remove_nic_calls_remove_nic_on_server_without_wait", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.contrib.tests.test_entity_should_exist_validator_py.TestEntityShouldExistValidator.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.feeds.tests.test_enriched_survey_response_py.TestSurveyResponseEventBuilder.test_datasender_info", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.feeds.tests.test_enriched_survey_response_py.TestSurveyResponseEventBuilder.test_feed_datasender_is_none_when_migrating_survey_response_with_document_for_owner_id_not_found", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.feeds.tests.test_enriched_survey_response_py.TestSurveyResponseEventBuilder.test_subject_answer_has_name_of_subject", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.feeds.tests.test_enriched_survey_response_py.TestSurveyResponseEventBuilder.test_subject_answer_id_as_value_rather_than_name_when_subject_is_not_existing"]
The function (patch) defined within the public class called public.The function start at line 109 and ends at 110. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [109.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside which is ["request"], It has 3062.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_id_generators_py.KoremutakeGeneratorTest.test_it_doesnt_reuse_a_name_twice", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.base_py.BaseTestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.AlertSubscriptionTestCase.test_send_alerts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.AlertSubscriptionTestCase.test_send_results_bad_email_template", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.AlertSubscriptionTestCase.test_send_results_email_text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.AlertSubscriptionTestCase.test_send_results_good_email_template", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repoguard_py.RepoguardTestCase.test_check_and_alert_on_new_repos", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repository_handler_py.RepositoryHandlerTestCase.test_create_repo_list_and_status_from_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repository_handler_py.RepositoryTestCase.test_detect_new_commit_hashes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3533652_prezi_repoguard.tests.test_repository_handler_py.RepositoryTestCase.test_get_last_commit_hashes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_add_windows_hostvars", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_add_windows_hostvars_to_linux", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_build_hostvars_dynamic_groups", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_find_hostvars_single_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_find_hostvars_single_server_none", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_parse_groups_result_to_dict_empty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_inv_py.TestClcInvFunctions.test_print_inventory_json", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_modify_server_py.TestClcModifyServerFunctions.test_modify_remove_nic_calls_remove_nic_on_server_with_wait", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.tests.test_clc_modify_server_py.TestClcModifyServerFunctions.test_modify_remove_nic_calls_remove_nic_on_server_without_wait", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.contrib.tests.test_entity_should_exist_validator_py.TestEntityShouldExistValidator.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.feeds.tests.test_enriched_survey_response_py.TestSurveyResponseEventBuilder.test_datasender_info", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.feeds.tests.test_enriched_survey_response_py.TestSurveyResponseEventBuilder.test_feed_datasender_is_none_when_migrating_survey_response_with_document_for_owner_id_not_found", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.feeds.tests.test_enriched_survey_response_py.TestSurveyResponseEventBuilder.test_subject_answer_has_name_of_subject", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.feeds.tests.test_enriched_survey_response_py.TestSurveyResponseEventBuilder.test_subject_answer_id_as_value_rather_than_name_when_subject_is_not_existing"].
unifyai_unify
public
public
0
0
delete
def delete(url, **kwargs):return request("DELETE", url, **kwargs)
1
2
2
18
0
113
114
113
url,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
303
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.thing_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.relationtype.relation_type_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.thing_type_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.database.database_steps_py.delete_databases", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.database.database_steps_py.delete_databases_throws_exception", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.deployment.test_py.TestClientPython.test_database", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_cluster_failover_py.TestClusterFailover.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_debug_py.TestDebug.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_client_base.tearDownClass", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_dartdoc_requires_oauth_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_new_requires_oauth_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.test_search_py.SearchTest.test_index_requires_api_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.oauth2client.django_orm_py.Storage.locked_delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535444_stormpath_stormpath_flask.flask_stormpath.models_py.User.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.bootstrap.initializer_py._delete_entity_delete_form_if_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.form_model_py.FormModel.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.tests.integration.test_kombu_events_py.KombuIntegrationTest.delete_queue", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.tests.integration.test_kombu_events_py.KombuIntegrationTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.data_py.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.experiment_py.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3645288_tktech_notifico.notifico.cli_py.irc_merge", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.contrib.restframework.serializers_py.TranslationsMixin.update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.manager_py.TranslationQueryset.delete_translations", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.tests.basic_py.DeleteTest.test_basic_delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.tests.basic_py.DeleteTest.test_multi_delete"]
The function (delete) defined within the public class called public.The function start at line 113 and ends at 114. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [113.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside which is ["request"], It has 303.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.thing_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.relationtype.relation_type_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.thing_type_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.database.database_steps_py.delete_databases", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.database.database_steps_py.delete_databases_throws_exception", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.deployment.test_py.TestClientPython.test_database", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_cluster_failover_py.TestClusterFailover.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_debug_py.TestDebug.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_client_base.tearDownClass", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_dartdoc_requires_oauth_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_new_requires_oauth_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.test_search_py.SearchTest.test_index_requires_api_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.oauth2client.django_orm_py.Storage.locked_delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535444_stormpath_stormpath_flask.flask_stormpath.models_py.User.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.bootstrap.initializer_py._delete_entity_delete_form_if_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.form_model_py.FormModel.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.tests.integration.test_kombu_events_py.KombuIntegrationTest.delete_queue", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.tests.integration.test_kombu_events_py.KombuIntegrationTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.data_py.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.experiment_py.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3645288_tktech_notifico.notifico.cli_py.irc_merge", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.contrib.restframework.serializers_py.TranslationsMixin.update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.manager_py.TranslationQueryset.delete_translations", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.tests.basic_py.DeleteTest.test_basic_delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.tests.basic_py.DeleteTest.test_multi_delete"].
unifyai_unify
public
public
0
0
set_map_mode
def set_map_mode(mode: str):global MAP_MODEMAP_MODE = mode
1
3
1
12
1
13
15
13
mode
['MAP_MODE']
None
{"Assign": 1}
0
3
0
[]
0
[]
The function (set_map_mode) defined within the public class called public.The function start at line 13 and ends at 15. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
get_map_mode
def get_map_mode() -> str:return MAP_MODE
1
2
0
8
0
18
19
18
[]
str
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.map_py.map"]
The function (get_map_mode) defined within the public class called public.The function start at line 18 and ends at 19. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.map_py.map"].
unifyai_unify
public
public
0
0
_is_iterable
def _is_iterable(item: Any) -> bool:try:iter(item)return Trueexcept TypeError:return False
2
6
1
22
0
22
27
22
item
[]
bool
{"Expr": 1, "Return": 2, "Try": 1}
1
6
1
["iter"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.map_py.map"]
The function (_is_iterable) defined within the public class called public.The function start at line 22 and ends at 27. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which is ["iter"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.map_py.map"].
unifyai_unify
public
public
0
0
map.fn_w_exception_handling
def fn_w_exception_handling(*a, **kw):try:return fn(*a, **kw)except Exception as e:if raise_exceptions:raise e
3
6
2
30
0
55
60
55
null
[]
None
null
0
0
0
null
0
null
The function (map.fn_w_exception_handling) defined within the public class called public.The function start at line 55 and ends at 60. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [55.0] and does not return any value..
unifyai_unify
public
public
0
0
map.fn_w_indexing
def fn_w_indexing(rets: List[None], thread_idx: int, *a, **kw):for var, value in kw["context"].items():var.set(value)del kw["context"]ret = fn_w_exception_handling(*a, **kw)pbar.update(1)rets[thread_idx] = ret
2
7
4
67
0
123
129
123
null
[]
None
null
0
0
0
null
0
null
The function (map.fn_w_indexing) defined within the public class called public.The function start at line 123 and ends at 129. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [123.0] and does not return any value..
unifyai_unify
public
public
0
0
map.map._run_asyncio_in_thread.fn_wrapper
async def fn_wrapper(*args, **kwargs):async with semaphore:return await asyncio.to_thread(fn_w_exception_handling, *args, **kwargs)
1
3
2
27
0
153
155
153
null
[]
None
null
0
0
0
null
0
null
The function (map.map._run_asyncio_in_thread.fn_wrapper) defined within the public class called public.The function start at line 153 and ends at 155. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [153.0] and does not return any value..
unifyai_unify
public
public
0
0
map.map._run_asyncio_in_thread.main
async def main(fns):return await tqdm_asyncio.gather(*fns,desc=f"{name}Coroutines",disable=os.environ.get("TQDM_DISABLE", "0") == "1",)
1
6
1
35
0
161
166
161
null
[]
None
null
0
0
0
null
0
null
The function (map.map._run_asyncio_in_thread.main) defined within the public class called public.The function start at line 161 and ends at 166. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
map._run_asyncio_in_thread
def _run_asyncio_in_thread(ret):asyncio.set_event_loop(asyncio.new_event_loop())MAX_WORKERS = 100semaphore = asyncio.Semaphore(MAX_WORKERS)fns = []async def fn_wrapper(*args, **kwargs):async with semaphore:return await asyncio.to_thread(fn_w_exception_handling, *args, **kwargs)for _, a_n_kw in enumerate(args_n_kwargs):a, kw = a_n_kwfns.append(fn_wrapper(*a, **kw))async def main(fns):return await tqdm_asyncio.gather(*fns,desc=f"{name}Coroutines",disable=os.environ.get("TQDM_DISABLE", "0") == "1",)ret += asyncio.run(main(fns))
2
11
1
75
0
147
168
147
null
[]
None
null
0
0
0
null
0
null
The function (map._run_asyncio_in_thread) defined within the public class called public.The function start at line 147 and ends at 168. It contains 11 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
map
def map(fn: callable,*args,mode=None,name="",from_args=False,raise_exceptions=True,**kwargs,) -> Any:if name:name = (" ".join(substr[0].upper() + substr[1:] for substr in name.split("_")) + " ")if mode is None:mode = get_map_mode()assert mode in ("threading","asyncio","loop",), "map mode must be one of threading, asyncio or loop."def fn_w_exception_handling(*a, **kw):try:return fn(*a, **kw)except Exception as e:if raise_exceptions:raise eif from_args:args = list(args)for i, a in enumerate(args):if _is_iterable(a):args[i] = list(a)if args:num_calls = len(args[0])else:for v in kwargs.values():if isinstance(v, list):num_calls = len(v)breakelse:raise Exception("At least one of the args or kwargs must be a list, ""which is to be mapped across the threads",)args_n_kwargs = [(tuple(a[i] for a in args),{k: v[i] if (isinstance(v, list) or isinstance(v, tuple)) else vfor k, v in kwargs.items()},)for i in range(num_calls)]else:args_n_kwargs = args[0]if not isinstance(args_n_kwargs[0], tuple):if isinstance(args_n_kwargs[0], dict):args_n_kwargs = [((), item) for item in args_n_kwargs]else:args_n_kwargs = [((item,), {}) for item in args_n_kwargs]elif (not isinstance(args_n_kwargs[0][0], tuple)or len(args_n_kwargs[0]) < 2or not isinstance(args_n_kwargs[0][1], dict)):args_n_kwargs = [(item, {}) for item in args_n_kwargs]num_calls = len(args_n_kwargs)if mode == "loop":pbar = tqdm(total=num_calls, disable=os.environ.get("TQDM_DISABLE", "0") == "1")pbar.set_description(f"{name}Iterations")returns = list()for a, kw in args_n_kwargs:ret = fn_w_exception_handling(*a, **kw)returns.append(ret)pbar.update(1)pbar.close()return returnselif mode == "threading":pbar = tqdm(total=num_calls, disable=os.environ.get("TQDM_DISABLE", "0") == "1")pbar.set_description(f"{name}Threads")def fn_w_indexing(rets: List[None], thread_idx: int, *a, **kw):for var, value in kw["context"].items():var.set(value)del kw["context"]ret = fn_w_exception_handling(*a, **kw)pbar.update(1)rets[thread_idx] = retthreads = list()returns = [None] * num_callsfor i, a_n_kw in enumerate(args_n_kwargs):a, kw = a_n_kwkw["context"] = contextvars.copy_context()thread = threading.Thread(target=fn_w_indexing,args=(returns, i, *a),kwargs=kw,)thread.start()threads.append(thread)[thread.join() for thread in threads]pbar.close()return returnsdef _run_asyncio_in_thread(ret):asyncio.set_event_loop(asyncio.new_event_loop())MAX_WORKERS = 100semaphore = asyncio.Semaphore(MAX_WORKERS)fns = []async def fn_wrapper(*args, **kwargs):async with semaphore:return await asyncio.to_thread(fn_w_exception_handling, *args, **kwargs)for _, a_n_kw in enumerate(args_n_kwargs):a, kw = a_n_kwfns.append(fn_wrapper(*a, **kw))async def main(fns):return await tqdm_asyncio.gather(*fns,desc=f"{name}Coroutines",disable=os.environ.get("TQDM_DISABLE", "0") == "1",)ret += asyncio.run(main(fns))ret = []thread = threading.Thread(target=_run_asyncio_in_thread, args=(ret,))thread.start()thread.join()return ret
28
97
7
602
13
31
174
31
fn,*args,mode,name,from_args,raise_exceptions,**kwargs
['threads', 'MAX_WORKERS', 'args', 'semaphore', 'fns', 'args_n_kwargs', 'mode', 'ret', 'returns', 'num_calls', 'name', 'pbar', 'thread']
Any
{"Assign": 29, "AugAssign": 1, "Expr": 15, "For": 6, "If": 12, "Return": 6, "Try": 1}
62
144
62
["join", "upper", "name.split", "get_map_mode", "fn", "list", "enumerate", "_is_iterable", "list", "len", "kwargs.values", "isinstance", "len", "Exception", "tuple", "isinstance", "isinstance", "kwargs.items", "range", "isinstance", "isinstance", "isinstance", "len", "isinstance", "len", "tqdm", "os.environ.get", "pbar.set_description", "list", "fn_w_exception_handling", "returns.append", "pbar.update", "pbar.close", "tqdm", "os.environ.get", "pbar.set_description", "items", "var.set", "fn_w_exception_handling", "pbar.update", "list", "enumerate", "contextvars.copy_context", "threading.Thread", "thread.start", "threads.append", "thread.join", "pbar.close", "asyncio.set_event_loop", "asyncio.new_event_loop", "asyncio.Semaphore", "asyncio.to_thread", "enumerate", "fns.append", "fn_wrapper", "tqdm_asyncio.gather", "os.environ.get", "asyncio.run", "main", "threading.Thread", "thread.start", "thread.join"]
1,501
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.response_py.Record._diff", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.emojify_py.get_emoji_match", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.events_py.events_timer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.attribute_get_owners_explicit_with_annotations_contain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.attribute_get_owners_explicit_with_annotations_do_not_contain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.attribute_get_owners_with_annotations_contain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.attribute_get_owners_with_annotations_do_not_contain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.config.parameters_py.parse_list", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.transaction.transaction_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.common_py.format_param_list", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.formatting._formatter_py.HelpFormatter.write_text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.scripts.generate_git_example_py.parse_help", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.amiga.amigados_py.decode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.amiga.amigados_py.encode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.apple2.apple2_gcr_py.Apple2GCR.decode_flux", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.apple2.apple2_gcr_py.Apple2GCR.master_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.hp.hp_mmfm_py.HPMMFM.decode_flux", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.hp.hp_mmfm_py.HPMMFM.master_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.caps_py.IPF.get_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.dmk_py.DMK.from_bytes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.edsk_py.EDSK.from_bytes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.hfe_py.HFEv3_Generator.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.hfe_py.hfev3_mk_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.kryoflux_py.KryoFlux.emit_track"]
The function (map) defined within the public class called public.The function start at line 31 and ends at 174. It contains 97 lines of code and it has a cyclomatic complexity of 28. It takes 7 parameters, represented as [31.0] and does not return any value. It declares 62.0 functions, It has 62.0 functions called inside which are ["join", "upper", "name.split", "get_map_mode", "fn", "list", "enumerate", "_is_iterable", "list", "len", "kwargs.values", "isinstance", "len", "Exception", "tuple", "isinstance", "isinstance", "kwargs.items", "range", "isinstance", "isinstance", "isinstance", "len", "isinstance", "len", "tqdm", "os.environ.get", "pbar.set_description", "list", "fn_w_exception_handling", "returns.append", "pbar.update", "pbar.close", "tqdm", "os.environ.get", "pbar.set_description", "items", "var.set", "fn_w_exception_handling", "pbar.update", "list", "enumerate", "contextvars.copy_context", "threading.Thread", "thread.start", "threads.append", "thread.join", "pbar.close", "asyncio.set_event_loop", "asyncio.new_event_loop", "asyncio.Semaphore", "asyncio.to_thread", "enumerate", "fns.append", "fn_wrapper", "tqdm_asyncio.gather", "os.environ.get", "asyncio.run", "main", "threading.Thread", "thread.start", "thread.join"], It has 1501.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.response_py.Record._diff", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.emojify_py.get_emoji_match", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.events_py.events_timer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.attribute_get_owners_explicit_with_annotations_contain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.attribute_get_owners_explicit_with_annotations_do_not_contain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.attribute_get_owners_with_annotations_contain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.attribute_get_owners_with_annotations_do_not_contain", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.attributetype.attribute_type_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.config.parameters_py.parse_list", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.transaction.transaction_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.common_py.format_param_list", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.formatting._formatter_py.HelpFormatter.write_text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.scripts.generate_git_example_py.parse_help", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.amiga.amigados_py.decode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.amiga.amigados_py.encode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.apple2.apple2_gcr_py.Apple2GCR.decode_flux", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.apple2.apple2_gcr_py.Apple2GCR.master_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.hp.hp_mmfm_py.HPMMFM.decode_flux", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.codec.hp.hp_mmfm_py.HPMMFM.master_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.caps_py.IPF.get_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.dmk_py.DMK.from_bytes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.edsk_py.EDSK.from_bytes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.hfe_py.HFEv3_Generator.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.hfe_py.hfev3_mk_track", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.image.kryoflux_py.KryoFlux.emit_track"].
unifyai_unify
BaseCache
public
1
1
serialize_object
def serialize_object(obj: Any,cached_types: Dict[str, str] = None,idx: List[Union[str, int]] = None,indent: int = None,) -> Any:"""Serialize an object to a JSON-serializable format.Args:obj: Object to serializetype_registry: Dictionary to track object types for reconstructionpath: Current path in the object structureindent: JSON indentation levelReturns:Serialized object or JSON string if at root level"""# Prevent circular importfrom unify.logging.logs import Logbase = Falseif idx is None:base = Trueidx = list()if isinstance(obj, BaseModel):if cached_types is not None:cached_types[json.dumps(idx, indent=indent)] = obj.__class__.__name__ret = obj.model_dump()elif inspect.isclass(obj) and issubclass(obj, BaseModel):ret = obj.schema_json()elif isinstance(obj, Log):if cached_types is not None:cached_types[json.dumps(idx, indent=indent)] = obj.__class__.__name__ret = obj.to_json()elif isinstance(obj, dict):ret = {k: BaseCache.serialize_object(v, cached_types, idx + ["k"])for k, v in obj.items()}elif isinstance(obj, list):ret = [BaseCache.serialize_object(v, cached_types, idx + [i])for i, v in enumerate(obj)]elif isinstance(obj, tuple):ret = tuple(BaseCache.serialize_object(v, cached_types, idx + [i])for i, v in enumerate(obj))else:ret = objreturn json.dumps(ret, indent=indent) if base else ret
15
39
4
297
0
19
71
19
obj,cached_types,idx,indent
[]
Any
{"Assign": 12, "Expr": 1, "If": 9, "Return": 1}
21
53
21
["list", "isinstance", "json.dumps", "obj.model_dump", "inspect.isclass", "issubclass", "obj.schema_json", "isinstance", "json.dumps", "obj.to_json", "isinstance", "BaseCache.serialize_object", "obj.items", "isinstance", "BaseCache.serialize_object", "enumerate", "isinstance", "tuple", "BaseCache.serialize_object", "enumerate", "json.dumps"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._write_to_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.caching.base_cache_py.BaseCache.serialize_object"]
The function (serialize_object) defined within the public class called BaseCache, implement an interface, and it inherit another class.The function start at line 19 and ends at 71. It contains 39 lines of code and it has a cyclomatic complexity of 15. It takes 4 parameters, represented as [19.0] and does not return any value. It declares 21.0 functions, It has 21.0 functions called inside which are ["list", "isinstance", "json.dumps", "obj.model_dump", "inspect.isclass", "issubclass", "obj.schema_json", "isinstance", "json.dumps", "obj.to_json", "isinstance", "BaseCache.serialize_object", "obj.items", "isinstance", "BaseCache.serialize_object", "enumerate", "isinstance", "tuple", "BaseCache.serialize_object", "enumerate", "json.dumps"], It has 3.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._write_to_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.caching.base_cache_py.BaseCache.serialize_object"].