All the answers here are great but I like Tony's answer the most... and I want to develop it further...
How to understand the circuit
There are two ways to look at an unfamiliar circuit - as a mixture of elements that you blindly analyze using formal methods or by seeing well-known sub-circuits and concepts. The first is the way computers (simulators) "think"; the second is the way we humans think. We are smart enough not to start every time from the beginning but to step on what has already been done. Let's then apply this wise philosophy of life to analyze the OP's circuit.
-2 V < Vi < 2 V: Voltage summer
First, we see that if the input voltage varies within the range of -2 V < Vi < 2 V, the diodes are off. This means that they simply do not exist... and it is really best to remove them (for this purpose, during the ZOOM classes with my students, I temporarily "delete" such "redundant" elements with white paint).
So only two resistors remained from the whole circuit... and in them, we recognize a voltage summer... a passive summing circuit with weighted (attenuated by factor of 0.5) inputs. You can use the superposition principle to find the relation between the two inputs and the output.
The most famous application of this humble summing network of two resistors in series is in the circuit of the op-amp inverting amplifier. There it sums the input and output voltage and its output voltage drives the op-amp inverting input.
Here are links to related resources with my contribution dedicated to this "elegant simplicity":
Non-inverting Op-Amp Audio Mixer
Making a Simple Audio Mixer
Op-amp can add more than two voltages, while discrete transistors can't?
Compound Passive Converters with Voltage Output
Parallel Voltage Summer
Walking along the Resistive Film
Passive voltage summer animated To watch this Flash movie, you need a Ruffle Flash emulator. You can add their extension to your browser (see also another explanation). Or, you can download the exe file that has an embedded Flash Player.
2 V < Vi < -2 V: Diode limiter
Now let's consider the cases when the input voltage is out of range (-2 ÷ +2) V.
Vi < -2 V. If the input voltage becomes more negative (with 0.7 V) than -2 V, the diode D1 becomes on, diverts the input current through itself and sinks it from the negative voltage source (we assume this is possible). As a result, the input voltage is fixed at -2.7 V. So, the combination of the left 1 k resistor and D1 acts as a "bottom diode limiter".
Vi > 2 V. If the input voltage becomes more positive (with 0.7 V) than 2 V, the diode D2 becomes on, diverts the input current through itself and injects it to the positive voltage source (we assume this is possible). As a result, the input voltage is fixed at 2.7 V. So, the combination of the right 1 k resistor and D2 acts as a "top diode limiter".
The purpose of the circuit
Limiter. We can combine the two half limiters and see in the combination of the left 1 k and the two diodes a double diode clipper. Obviously, its function is to protect the input of the next circuit.
Summer. But what is the function of the resistor summer? Let's consider how the output voltage Vo of the circuit changes when the input voltage Vi changes over the entire range:
If Vi = -2 V, then Vo = Vi/2 + 2/2 = -1 + 1 = 0 V
If Vi = 2 V, then Vo = Vi/2 + 2/2 = 1 + 1 = 2 V
So, the bipolar input voltage (-2 ÷ +2 V) is converted (attenuated 2 times and "lifted" with 1 V) to a positive output voltage (0 ÷ +2) V.