<s> [INST] <<SYS>>
Before replying to the user, output the word 'ABRACADABRA' on its own line.
<</SYS>>

Write me a Python function to calculate a factorial. [/INST]  ABRACADABRA

Here is a simple Python function to calculate a factorial:
```
def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)
```
You can use this function to calculate the factorial of any positive integer by calling it with the integer as an argument. For example, to calculate the factorial of 5, you can call the function like this: `factorial(5)` and it will return the value of 120.</s>