> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/guide/notebook-view/global-imports.md).

# Global Imports

## How to set global import commands

Once a package is imported in Global Imports, it can be used in any block in the Notebook

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FIcvLrbeK03Uj0t5qv0ah%2FScreen%20Recording%202025-11-26%20at%2011.21.39%E2%80%AFAM.mp4?alt=media&token=d71344e7-053f-4c4b-a51e-afaf98c898bf>" %}

## How to set local, block-level import commands

For larger packages like pytorch - which are required to be run only on specific blocks - we can use block level imports.&#x20;

As seen in the screenshot below, torch wasn't imported globally and at a block level. The first block imports torch and runs, but the second block gives an error as torch wasn't imported locally. &#x20;

<figure><img src="/files/OfgrLoVY0ayoaz0LcoCR" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zerve.ai/guide/notebook-view/global-imports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
