Hi, I need code which will generate a short password for me. Please make it a function and in python. Here are the requirements for the password.

Exactly 4 characters long
1 Special character
Contain at least 1 lowercase character
Contain 1 uppercase character
Contain 1 number
system
namaste, mujhe code kii aavashyaktaa he jo mere liye ek chota password utpann karegaa.kripaya ise ek fnction or paythan main banaaen.yahaan password ke liye aavashyaktaaen hai.

bilkul 4 akshar lambey
1 vishesh charitra
kam se kam 1 loarkes varna hote hai
1 aprkes charitra ko shaamil karen
1 number he
user
yahaan ek chota paythan fnction he jo aapke die gaye maapdandon ke aadhaar par ek yadrichhik password banayega.

aayaat string
yadrichhik aayaat

def generate_password ():
    # prayek shrenee ke liye charitra set ko paribhaashit karen
    special_chars = string.punctuation
    LOWERCASE_CHARS = STRING.ASCII_LOWERCASE
    Uppercase_chars = string.ascii_uppercase
    numeric_chars = string.digits

    # prayek shrenee se varnon ko yadrichhik rup se chayan karke ek password utpann karen
    password = random.chois (special_chars)
    password += random.chois (loarkes_chars)
    password += random.chois (aprkes_chars)
    password += random.choice (numeric_chars)
    
    password lautaaen

aapako kisi or chiz kii zaroorat ho to mujhe bataaen!
assistant
<|system|>
</s>
<|user|>
namaste, mujhe code kii aavashyaktaa he jo mere liye ek chota password utpann karegaa.kripaya ise ek fnction or paythan main banaaen.yahaan password ke liye aavashyaktaaen hai.

bilkul 4 akshar lambey
1 vishesh charitra
kam se kam 1 loarkes varna hote hai
1 aprkes charitra ko shaamil karen
1 number he</s>
<|assistant|>
yahaan ek chota paythan fnction he jo aapke die gaye maapdandon ke aadhaar par ek yadrichhik password banayega.

aayaat string
yadrichhik aayaat

def generate_password ():
    # prayek shrenee ke liye charitra set ko paribhaashit karen
    special_chars = string.punctuation
    LOWERCASE_CHARS = STRING.ASCII_LOWERCASE
    Uppercase_chars = string.ascii_uppercase
    numeric_chars = string.digits

    # prayek shrenee se varnon ko yadrichhik rup se chayan karke ek password utpann karen
    password = random.chois (special_chars)
    password += random.chois (loarkes_chars)
    password += random.chois (aprkes_chars)
    password += random.choice (numeric_chars)
    
    password lautaaen

aapako kisi or chiz kii zaroorat ho to mujhe bataaen!</s>
